diff --git a/Tests/ImperialTests/ShopifyTests.swift b/Tests/ImperialTests/ShopifyTests.swift index a84e661f..8f76472f 100644 --- a/Tests/ImperialTests/ShopifyTests.swift +++ b/Tests/ImperialTests/ShopifyTests.swift @@ -16,7 +16,8 @@ struct ShopifyTests { ) try await app.test( - .GET, "/service-auth-complete?" + .GET, + "/service-auth-complete?" + "code=0907a61c0c8d55e99db179b68161bc00&" + "hmac=700e2dadb827fcc8609e9d5ce208b2e9cdaab9df07390d2cbca10d7c328fc4bf&" + "shop=some-shop.myshopify.com&" @@ -57,12 +58,13 @@ struct ShopifyTests { } @Test("HMAC Validation") func hmacValidation() throws { - let url = URL(string: "https://domain.com/?" - + "code=0907a61c0c8d55e99db179b68161bc00&" - + "hmac=700e2dadb827fcc8609e9d5ce208b2e9cdaab9df07390d2cbca10d7c328fc4bf&" - + "shop=some-shop.myshopify.com&" - + "state=0.6784241404160823&" - + "timestamp=1337178173" + let url = URL( + string: "https://domain.com/?" + + "code=0907a61c0c8d55e99db179b68161bc00&" + + "hmac=700e2dadb827fcc8609e9d5ce208b2e9cdaab9df07390d2cbca10d7c328fc4bf&" + + "shop=some-shop.myshopify.com&" + + "state=0.6784241404160823&" + + "timestamp=1337178173" )! let hmac = url.generateHMAC(key: "hush")