[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: merchant spec: more checks
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: merchant spec: more checks |
Date: |
Fri, 13 Aug 2021 14:28:59 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 9e07bc99 merchant spec: more checks
9e07bc99 is described below
commit 9e07bc99639b1ddeb401b463a2a658caeb79f487
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Aug 13 14:28:54 2021 +0200
merchant spec: more checks
---
.../test-merchant-spec-public-orders.ts | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
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 98528ada..6e08d7f6 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(
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: merchant spec: more checks,
gnunet <=