Skip to content

Commit edd3de4

Browse files
committed
Update OrderRemote tests to check for paymentURL
1 parent 03ea1a2 commit edd3de4

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

Networking/NetworkingTests/Mapper/OrderMapperTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ final class OrderMapperTests: XCTestCase {
4040
XCTAssertEqual(order.shippingTax, "0.00")
4141
XCTAssertEqual(order.total, "31.20")
4242
XCTAssertEqual(order.totalTax, "1.20")
43+
XCTAssertEqual(order.paymentURL, URL(string: "http://www.automattic.com"))
4344
}
4445

4546
/// Verifies that all of the Order Address fields are parsed correctly.

Networking/NetworkingTests/Responses/order.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
],
101101
"payment_method": "stripe",
102102
"payment_method_title": "Credit Card (Stripe)",
103+
"payment_url": "http://www.automattic.com",
103104
"date_paid_gmt": "2018-04-03T23:05:14",
104105
"date_completed_gmt": null,
105106
"line_items": [

WooCommerce/Classes/ViewRelated/Orders/Order Details/Address Edit/EditOrderAddressForm.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ struct EditAddressForm_Previews: PreviewProvider {
391391
totalTax: "1.20",
392392
paymentMethodID: "stripe",
393393
paymentMethodTitle: "Credit Card (Stripe)",
394+
paymentURL: nil,
394395
chargeID: nil,
395396
items: [],
396397
billingAddress: sampleAddress,

WooCommerce/Classes/ViewRelated/Orders/Order Details/Shipping Labels/Create Shipping Label Form/Package Details/Multi-package/ShippingLabelPackagesFormViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ extension ShippingLabelPackagesFormViewModel {
461461
totalTax: "1.20",
462462
paymentMethodID: "stripe",
463463
paymentMethodTitle: "Credit Card (Stripe)",
464+
paymentURL: nil,
464465
chargeID: nil,
465466
items: sampleItems(),
466467
billingAddress: sampleAddress(),

WooCommerce/Classes/ViewRelated/Orders/Order Details/Shipping Labels/Create Shipping Label Form/Package Details/ShippingLabelSampleData.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ enum ShippingLabelSampleData {
2626
totalTax: "1.20",
2727
paymentMethodID: "stripe",
2828
paymentMethodTitle: "Credit Card (Stripe)",
29+
paymentURL: nil,
2930
chargeID: nil,
3031
items: sampleItems(),
3132
billingAddress: sampleAddress(),

0 commit comments

Comments
 (0)