diff options
author | Florian Dold <florian@dold.me> | 2023-06-30 16:44:46 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-06-30 16:44:46 +0200 |
commit | 5754f00399d923a605619b3ee6ae84c11cea25f6 (patch) | |
tree | 002d09ec7640fa3817a205b5865ab89c94196842 | |
parent | e0d4f7e4af81686ff719448b86512accc89d7ac3 (diff) | |
download | wallet-core-5754f00399d923a605619b3ee6ae84c11cea25f6.tar.xz |
harness: check balance in basic payment test
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-payment.ts b/packages/taler-harness/src/integrationtests/test-payment.ts index 60d8e320d..f184e57e7 100644 --- a/packages/taler-harness/src/integrationtests/test-payment.ts +++ b/packages/taler-harness/src/integrationtests/test-payment.ts @@ -17,12 +17,14 @@ /** * Imports. */ +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironment, withdrawViaBank, makeTestPayment, } from "../harness/helpers.js"; +import { j2s } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal and payment. @@ -68,6 +70,12 @@ export async function runPaymentTest(t: GlobalTestState) { await makeTestPayment(t, { wallet, merchant, order: order3 }); await wallet.runUntilDone(); + + const bal = await wallet.client.call(WalletApiOperation.GetBalances, {}); + console.log(`balance after 3 payments: ${j2s(bal)}`); + t.assertAmountEquals(bal.balances[0].available, "TESTKUDOS:3.8"); + t.assertAmountEquals(bal.balances[0].pendingIncoming, "TESTKUDOS:0"); + t.assertAmountEquals(bal.balances[0].pendingOutgoing, "TESTKUDOS:0"); } runPaymentTest.suites = ["wallet"]; |