File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Networking/NetworkingTests/Mapper Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,24 @@ final class OrderMapperTests: XCTestCase {
302302 let expectedAttributes = [ OrderItemAttribute ( metaID: 3665 , name: " Required Weight (kg) " , value: " 2.3 " ) ]
303303 assertEqual ( attributes, expectedAttributes)
304304 }
305+
306+ func test_order_tax_lines_are_parsed_successfully( ) throws {
307+ let order = try XCTUnwrap ( mapLoadOrderResponse ( ) )
308+
309+ XCTAssertNotNil ( order. tax)
310+ XCTAssertEqual ( order. tax. count, 1 )
311+
312+ let tax = try XCTUnwrap ( order. tax. first)
313+ XCTAssertEqual ( tax. taxID, 1330 )
314+ XCTAssertEqual ( tax. rateCode, " US-NY-STATE-2 " )
315+ XCTAssertEqual ( tax. rateID, 6 )
316+ XCTAssertEqual ( tax. label, " State " )
317+ XCTAssertEqual ( tax. isCompoundTaxRate, true )
318+ XCTAssertEqual ( tax. totalTax, " 7.71 " )
319+ XCTAssertEqual ( tax. totalShippingTax, " 0.00 " )
320+ XCTAssertEqual ( tax. ratePercent, 4.5 )
321+ XCTAssertEqual ( tax. attributes, [ ] )
322+ }
305323}
306324
307325
You can’t perform that action at this time.
0 commit comments