gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: harness: test for pendingInco


From: gnunet
Subject: [taler-wallet-core] branch master updated: harness: test for pendingIncoming
Date: Tue, 20 Feb 2024 00:05:32 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new d223f9630 harness: test for pendingIncoming
d223f9630 is described below

commit d223f963021eb1562d6d3be350d79c27d0499ec0
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Feb 20 00:05:32 2024 +0100

    harness: test for pendingIncoming
---
 .../test-wallet-balance-notifications.ts           | 28 +++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git 
a/packages/taler-harness/src/integrationtests/test-wallet-balance-notifications.ts
 
b/packages/taler-harness/src/integrationtests/test-wallet-balance-notifications.ts
index 66093410f..290ef7e2d 100644
--- 
a/packages/taler-harness/src/integrationtests/test-wallet-balance-notifications.ts
+++ 
b/packages/taler-harness/src/integrationtests/test-wallet-balance-notifications.ts
@@ -32,7 +32,7 @@ import { createSimpleTestkudosEnvironmentV2 } from 
"../harness/helpers.js";
 export async function runWalletBalanceNotificationsTest(t: GlobalTestState) {
   // Set up test environment
 
-  const { walletClient, bank, exchange, merchant } =
+  const { walletClient, bank, exchange, merchant, walletService } =
     await createSimpleTestkudosEnvironmentV2(t);
 
   const amount = "TESTKUDOS:20";
@@ -80,6 +80,32 @@ export async function runWalletBalanceNotificationsTest(t: 
GlobalTestState) {
   });
 
   await withdrawalFinishedCond;
+
+  // Second withdrawal!
+  {
+    const wop2 = await bankClient.createWithdrawalOperation(
+      user.username,
+      "TESTKUDOS:5",
+    );
+
+    await walletClient.call(WalletApiOperation.GetWithdrawalDetailsForUri, {
+      talerWithdrawUri: wop2.taler_withdraw_uri,
+    });
+
+    const acceptRes = await walletClient.call(
+      WalletApiOperation.AcceptBankIntegratedWithdrawal,
+      {
+        exchangeBaseUrl: exchange.baseUrl,
+        talerWithdrawUri: wop2.taler_withdraw_uri,
+      },
+    );
+
+    const bal = await walletClient.call(WalletApiOperation.GetBalances, {});
+    t.assertAmountEquals(bal.balances[0].available, "TESTKUDOS:19.53");
+    t.assertAmountEquals(bal.balances[0].pendingIncoming, "TESTKUDOS:4.85");
+
+    await walletService.stop();
+  }
 }
 
 runWalletBalanceNotificationsTest.suites = ["wallet"];

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]