merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit a91527bb88e96bdc3023bb0a4fadf637eef2df5e
parent 3ede019d207c97ac1ba9c84b45ace5788b3dcffe
Author: Sebastian <sebasjm@gmail.com>
Date:   Fri, 28 May 2021 13:02:37 -0300

adding test creating a reserve with invalid currency

Diffstat:
Msrc/testing/test_merchant_reserve_creation.sh | 30+++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/testing/test_merchant_reserve_creation.sh b/src/testing/test_merchant_reserve_creation.sh @@ -20,21 +20,6 @@ fi echo OK -# echo -n "trying to create invalid reserve ..." - -# STATUS=$(curl 'http://localhost:9966/instances/default/private/reserves' \ -# -d '{"initial_balance":"INVALID:2","exchange_url":"'$EXCHANGE_URL'","wire_method":"x-taler-bank"}' \ -# -w "%{http_code}" -s -o $LAST_RESPONSE) - -# if [ "$STATUS" != "400" ] -# then -# echo 'should respond invalid, bad currency. got:' $STATUS -# exit 1 -# fi - -# echo "FAILED (which is ok)" - - echo -n "creating reserve ..." STATUS=$(curl 'http://localhost:9966/instances/default/private/reserves' \ @@ -153,6 +138,21 @@ fi echo OK +echo -n "trying to create invalid reserve ..." + +STATUS=$(curl 'http://localhost:9966/instances/default/private/reserves' \ + -d '{"initial_balance":"INVALID:2","exchange_url":"'$EXCHANGE_URL'","wire_method":"x-taler-bank"}' \ + -w "%{http_code}" -s -o $LAST_RESPONSE) + +if [ "$STATUS" != "400" ] +then + echo 'should respond invalid, bad currency. got:' $STATUS + exit 1 +fi + +echo "FAILED (which is ok)" + + exit 0