diff options
Diffstat (limited to 'packages/taler-harness/src')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-known-accounts.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-known-accounts.ts b/packages/taler-harness/src/integrationtests/test-known-accounts.ts index 0c5c5ca47..7b5d2fb61 100644 --- a/packages/taler-harness/src/integrationtests/test-known-accounts.ts +++ b/packages/taler-harness/src/integrationtests/test-known-accounts.ts @@ -84,6 +84,26 @@ export async function runKnownAccountsTest(t: GlobalTestState) { const e = accts2.accounts.find((x) => x.alias == "Foo"); t.assertDeepEqual(e?.currencies, ["CHF"]); } + + // Test replacement + + await walletClient.call(WalletApiOperation.AddKnownBankAccount, { + replacePaytoUri: "payto://iban/FOOBAR", + paytoUri: "payto://iban/QUUX", + alias: "Foo", + currencies: ["CHF"], + }); + + { + const accts2 = await walletClient.call( + WalletApiOperation.ListKnownBankAccounts, + {}, + ); + console.log(`accounts after replace: ${j2s(accts2)}`); + t.assertDeepEqual(accts2.accounts.length, 2); + const e = accts2.accounts.find((x) => x.alias == "Foo"); + t.assertDeepEqual(e?.paytoUri, "payto://iban/QUUX"); + } } runKnownAccountsTest.suites = ["wallet"]; |