diff options
author | Sebastian <sebasjm@gmail.com> | 2021-05-28 13:02:37 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-05-28 13:03:08 -0300 |
commit | a91527bb88e96bdc3023bb0a4fadf637eef2df5e (patch) | |
tree | d60ea7f4a09c6553ea4f1ec71a9f25b10d2663b0 /src/testing | |
parent | 3ede019d207c97ac1ba9c84b45ace5788b3dcffe (diff) | |
download | merchant-a91527bb88e96bdc3023bb0a4fadf637eef2df5e.tar.gz merchant-a91527bb88e96bdc3023bb0a4fadf637eef2df5e.tar.bz2 merchant-a91527bb88e96bdc3023bb0a4fadf637eef2df5e.zip |
adding test creating a reserve with invalid currency
Diffstat (limited to 'src/testing')
-rwxr-xr-x | src/testing/test_merchant_reserve_creation.sh | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/testing/test_merchant_reserve_creation.sh b/src/testing/test_merchant_reserve_creation.sh index 2bb4b8d1..4dd12926 100755 --- 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 |