aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts26
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"];