summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts')
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts17
1 files changed, 16 insertions, 1 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts
index 98528ada4..6e08d7f6e 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts
@@ -254,7 +254,7 @@ export async function runMerchantSpecPublicOrdersTest(t: GlobalTestState) {
t.assertDeepEqual(httpResp.status, 200);
}
- // paid, access with correct claim token
+ // paid, access with correct claim token, JSON
{
const url = new URL(`orders/${orderId}`, merchantBaseUrl);
url.searchParams.set("token", claimToken);
@@ -262,6 +262,21 @@ export async function runMerchantSpecPublicOrdersTest(t: GlobalTestState) {
const r = await httpResp.json();
console.log(r);
t.assertDeepEqual(httpResp.status, 200);
+ const respFulfillmentUrl = r.fulfillment_url;
+ t.assertDeepEqual(respFulfillmentUrl, "https://example.com/article42");
+ }
+
+ // paid, access with correct claim token, HTML
+ {
+ const url = new URL(`orders/${orderId}`, merchantBaseUrl);
+ url.searchParams.set("token", claimToken);
+ const httpResp = await httpLib.get(url.href, {
+ headers: { Accept: "text/html" },
+ });
+ t.assertDeepEqual(httpResp.status, 302);
+ const location = httpResp.headers.get("Location");
+ console.log("location header:", location);
+ t.assertDeepEqual(location, "https://example.com/article42");
}
const confirmPayRes2 = await wallet.client.call(