commit 0b9faf7ddee658bd3080fd487232642e7b14ae32
parent f9d4ff5b43e48a07ac81d7e7ef800ddb12f5f90a
Author: Florian Dold <florian@dold.me>
Date: Thu, 13 Jun 2024 14:05:40 +0200
harness: add test assertions
Diffstat:
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-flex.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-flex.ts
@@ -49,22 +49,25 @@ export async function runWithdrawalFlexTest(t: GlobalTestState) {
console.log(j2s(r1));
+ t.assertTrue(!r1.amount);
+
// Withdraw
- const r2 = await walletClient.call(
- WalletApiOperation.AcceptBankIntegratedWithdrawal,
- {
- exchangeBaseUrl: exchange.baseUrl,
- talerWithdrawUri: wop.taler_withdraw_uri,
- amount: "TESTKUDOS:10",
- },
- );
+ await walletClient.call(WalletApiOperation.AcceptBankIntegratedWithdrawal, {
+ exchangeBaseUrl: exchange.baseUrl,
+ talerWithdrawUri: wop.taler_withdraw_uri,
+ amount: "TESTKUDOS:10",
+ });
await bankClient.confirmWithdrawalOperation(user.username, {
withdrawalOperationId: wop.withdrawal_id,
});
await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
+
+ const bal = await walletClient.call(WalletApiOperation.GetBalances, {});
+
+ t.assertAmountEquals(bal.balances[0].available, "TESTKUDOS:9.72");
}
runWithdrawalFlexTest.suites = ["wallet"];