aboutsummaryrefslogtreecommitdiff
path: root/integrationtests/test-withdrawal.sh
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-05-18 13:45:21 -0300
committerTorsten Grote <t@grobox.de>2020-05-18 13:46:00 -0300
commita3354306c629ab3ab5f45617f31b90976416105a (patch)
treea5cb7255596e2a3e7b4bfa48df18a72e0e719921 /integrationtests/test-withdrawal.sh
parentff50526560880ef070f1f6ec5a0a7eb4ae3fee2e (diff)
downloadwallet-core-a3354306c629ab3ab5f45617f31b90976416105a.tar.xz
Add integration test for withdrawals
Diffstat (limited to 'integrationtests/test-withdrawal.sh')
-rwxr-xr-xintegrationtests/test-withdrawal.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/integrationtests/test-withdrawal.sh b/integrationtests/test-withdrawal.sh
new file mode 100755
index 000000000..1450f6258
--- /dev/null
+++ b/integrationtests/test-withdrawal.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Script to check that the wallet does a withdrawal correctly
+
+source "common.sh"
+normal_start_and_wait "withdrawal"
+
+echo "Withdraw 5 TESTKUDOS"
+taler-wallet-cli --wallet-db="$WALLET_DB" --no-throttle testing withdraw -e "$EXCHANGE_URL" -b "$BANK_URL" -a "TESTKUDOS:5" >>"$LOG" 2>>"$LOG"
+BALANCE_1=$(get_balance)
+assert_equal "$BALANCE_1" "TESTKUDOS:4.84"
+echo "Balance after withdrawal: $BALANCE_1"
+
+echo "Withdraw 10 TESTKUDOS"
+taler-wallet-cli --wallet-db="$WALLET_DB" --no-throttle testing withdraw -e "$EXCHANGE_URL" -b "$BANK_URL" -a "TESTKUDOS:10" >>"$LOG" 2>>"$LOG"
+BALANCE_2=$(get_balance)
+assert_equal "$BALANCE_2" "TESTKUDOS:14.66"
+echo "Balance after withdrawal: $BALANCE_2"
+
+exit_success