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/libeufin.ts | |
parent | faf83181de460f61f91655f0386f5b9f044489d3 (diff) |
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/libeufin.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/libeufin.ts | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts index ad906debf..cee0f79cb 100644 --- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts +++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts @@ -39,8 +39,8 @@ export interface LibeufinNexusServiceInterface { } export interface LibeufinServices { - libeufinSandbox: LibeufinSandboxServiceInterface; - libeufinNexus: LibeufinNexusServiceInterface; + libeufinSandbox: LibeufinSandboxService; + libeufinNexus: LibeufinNexusService; commonDb: DbInfo; } @@ -279,7 +279,7 @@ export interface SimulateIncomingTransactionRequest { /** * The bundle aims at minimizing the amount of input * data that is required to initialize a new user + Ebics - * connection thereof. + * connection. */ export class NexusUserBundle { userReq: CreateNexusUserRequest; @@ -651,7 +651,7 @@ export namespace LibeufinSandboxApi { } export async function bookPayment( - libeufinSandboxService: LibeufinSandboxServiceInterface, + libeufinSandboxService: LibeufinSandboxService, creditorBundle: SandboxUserBundle, debitorBundle: SandboxUserBundle, subject: string, @@ -849,9 +849,34 @@ export namespace LibeufinNexusApi { ); } + export async function getAccountTransactions( + libeufinNexusService: LibeufinNexusService, + accountName: string, + username: string = "admin", + password: string = "test", + ): Promise<void> { + const baseUrl = libeufinNexusService.baseUrl; + let url = new URL( + `/bank-accounts/${accountName}/transactions`, + baseUrl, + ); + await axios.get( + url.href, + { + auth: { + username: username, + password: password, + }, + }, + ); + } + + export async function fetchAllTransactions( libeufinNexusService: LibeufinNexusService, accountName: string, + username: string = "admin", + password: string = "test", ): Promise<void> { const baseUrl = libeufinNexusService.baseUrl; let url = new URL( @@ -866,8 +891,8 @@ export namespace LibeufinNexusApi { }, { auth: { - username: "admin", - password: "test", + username: username, + password: password, }, }, ); |