aboutsummaryrefslogtreecommitdiff
path: root/src/util/taleruri-test.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-30 17:28:09 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-30 17:28:14 +0530
commitb51932cc85287a04dca13cbb3e4d12c5b98e9c47 (patch)
tree2af698817f7d5501ff7c39922a89cd619237f974 /src/util/taleruri-test.ts
parent78718d35343adfe36a4511a06662b626f4bf4957 (diff)
downloadwallet-core-b51932cc85287a04dca13cbb3e4d12c5b98e9c47.tar.xz
support claim tokensv0.7.1-dev.15
Diffstat (limited to 'src/util/taleruri-test.ts')
-rw-r--r--src/util/taleruri-test.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util/taleruri-test.ts b/src/util/taleruri-test.ts
index 314a981fd..44edbe1c1 100644
--- a/src/util/taleruri-test.ts
+++ b/src/util/taleruri-test.ts
@@ -63,6 +63,17 @@ test("taler pay url parsing: instance", (t) => {
t.is(r1.orderId, "myorder");
});
+test("taler pay url parsing (claim token)", (t) => {
+ const url1 = "taler://pay/example.com/instances/myinst/myorder/?c=ASDF";
+ const r1 = parsePayUri(url1);
+ if (!r1) {
+ t.fail();
+ return;
+ }
+ t.is(r1.merchantBaseUrl, "https://example.com/instances/myinst/");
+ t.is(r1.orderId, "myorder");
+ t.is(r1.claimToken, "ASDF");
+});
test("taler refund uri parsing: non-https #1", (t) => {
const url1 = "taler+http://refund/example.com/myorder";