diff options
author | MS <ms@taler.net> | 2021-04-29 11:19:17 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2021-04-29 11:19:17 +0200 |
commit | 9928d2ef35bbc8dbbfd7b673b79bc6050740e686 (patch) | |
tree | be909f9b08c0f6a5fecda51736f6ab810f4a6bee /packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts | |
parent | faf83181de460f61f91655f0386f5b9f044489d3 (diff) | |
download | wallet-core-9928d2ef35bbc8dbbfd7b673b79bc6050740e686.tar.gz wallet-core-9928d2ef35bbc8dbbfd7b673b79bc6050740e686.tar.bz2 wallet-core-9928d2ef35bbc8dbbfd7b673b79bc6050740e686.zip |
Libeufin Tests.
Testing refunds due to invalid subject. Up to the
point where the list of transactions is returned by
the local bank account.
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts index 0adabbf4e..dc5a14c88 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts @@ -23,6 +23,7 @@ import { NexusUserBundle, launchLibeufinServices, LibeufinSandboxApi, + LibeufinNexusApi, } from "./libeufin"; /** @@ -46,6 +47,10 @@ export async function runLibeufinRefundTest(t: GlobalTestState) { [user01sandbox, user02sandbox], ); + // user02 - acting as the Exchange - gets money from user01, + // but this one gets the subject wrong - not a valid public key. + // The result should be a reimbursement - minus a small fee - of + // the paid money to user01. await LibeufinSandboxApi.bookPayment( libeufinServices.libeufinSandbox, user02sandbox, @@ -54,4 +59,25 @@ export async function runLibeufinRefundTest(t: GlobalTestState) { "1", "EUR", ); + + // STEPS. + + // 1. Exchange must import this payment into its Nexus / Facade. + // 2. Facade logic should process incoming payments. + // 3. A reimbursement should be prepared. + // 4. The reimbursement payment should be sent. + + // Steps 1-3 should happen all-at-once when triggering the import + // logic. 4 needs to be explicitly triggered (because here there's + // no background task activated, yet?) + + await LibeufinNexusApi.fetchAllTransactions( + libeufinServices.libeufinNexus, + user02nexus.localAccountName, + ); + + await LibeufinNexusApi.getAccountTransactions( + libeufinServices.libeufinNexus, + user02nexus.localAccountName, + ); } |