diff options
author | MS <ms@taler.net> | 2021-08-17 23:16:51 -1100 |
---|---|---|
committer | MS <ms@taler.net> | 2021-08-17 23:16:51 -1100 |
commit | 1d711d441dd0c584f213abf9a97d685b82aafef8 (patch) | |
tree | 219363c9b769ac4ba1d772c83a1aad74866a41af /packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts | |
parent | 2450ecbe6a0070af6ec358a58c58bfc3e100a421 (diff) | |
download | wallet-core-1d711d441dd0c584f213abf9a97d685b82aafef8.tar.xz |
Anastasis facade: check transactions number
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts index 0bcc9a0bc..48460914b 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts @@ -58,6 +58,18 @@ export async function runLibeufinAnastasisFacadeTest(t: GlobalTestState) { t.assertTrue(anastasisBaseUrl.startsWith("http://")); t.assertTrue(anastasisBaseUrl.endsWith("/")); + await LibeufinNexusApi.fetchAllTransactions( + libeufinServices.libeufinNexus, + user01nexus.localAccountName, + ); + + // check if empty. + let txsEmpty = await LibeufinNexusApi.getAnastasisTransactions( + libeufinServices.libeufinNexus, + anastasisBaseUrl, {delta: 5}) + + t.assertTrue(txsEmpty.data.incoming_transactions.length == 0); + LibeufinSandboxApi.simulateIncomingTransaction( libeufinServices.libeufinSandbox, user01sandbox.ebicsBankAccount.label, @@ -70,6 +82,18 @@ export async function runLibeufinAnastasisFacadeTest(t: GlobalTestState) { }, ) + LibeufinSandboxApi.simulateIncomingTransaction( + libeufinServices.libeufinSandbox, + user01sandbox.ebicsBankAccount.label, + { + debtorIban: "ES3314655813489414469157", + debtorBic: "BCMAESM1XXX", + debtorName: "Mock Donor", + subject: "another Anastasis donation", + amount: "1", // Sandbox takes currency from its "config" + }, + ) + await LibeufinNexusApi.fetchAllTransactions( libeufinServices.libeufinNexus, user01nexus.localAccountName, @@ -79,7 +103,7 @@ export async function runLibeufinAnastasisFacadeTest(t: GlobalTestState) { libeufinServices.libeufinNexus, anastasisBaseUrl, {delta: 5}) - // FIXME: test more! + t.assertTrue(txs.data.incoming_transactions.length == 2); } runLibeufinAnastasisFacadeTest.suites = ["libeufin"]; |