@@ -1083,8 +1083,9 @@ final class WooShippingStoreTests: XCTestCase {
10831083 usedDate: nil ,
10841084 expiryDate: nil )
10851085 } ( )
1086+ let shipments = [ " 0 " : [ WooShippingShipmentItem . fake ( ) ] ]
10861087 let expectedResponse = WooShippingConfig . fake ( ) . copy (
1087- shipments: [ " 0 " : [ WooShippingShipmentItem . fake ( ) ] ] ,
1088+ shipments: shipments ,
10881089 shippingLabelData: WooShippingLabelData ( currentOrderLabels: [ expectedShippingLabel] )
10891090 )
10901091 remote. whenLoadingConfig ( siteID: sampleSiteID, thenReturn: . success( expectedResponse) )
@@ -1093,7 +1094,7 @@ final class WooShippingStoreTests: XCTestCase {
10931094 insertOrder ( siteID: sampleSiteID, orderID: orderID)
10941095
10951096 // When
1096- let result : Result < [ Yosemite . ShippingLabel ] , Error > = waitFor { promise in
1097+ let result : Result < ShippingLabelSyncResult , Error > = waitFor { promise in
10971098 let action = WooShippingAction . syncShippingLabels ( siteID: self . sampleSiteID, orderID: orderID) { result in
10981099 promise ( result)
10991100 }
@@ -1102,6 +1103,9 @@ final class WooShippingStoreTests: XCTestCase {
11021103
11031104 // Then
11041105 XCTAssertTrue ( result. isSuccess)
1106+ let syncResult = try XCTUnwrap ( result. get ( ) )
1107+ XCTAssertEqual ( syncResult. labels, [ expectedShippingLabel] )
1108+ XCTAssertEqual ( syncResult. shipments, shipments)
11051109
11061110 let persistedOrder = try XCTUnwrap ( viewStorage. loadOrder ( siteID: sampleSiteID, orderID: orderID) )
11071111 let persistedShippingLabels = try XCTUnwrap ( viewStorage. loadAllShippingLabels ( siteID: sampleSiteID, orderID: orderID) )
0 commit comments