summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-05-05 10:26:25 -0300
committerSebastian <sebasjm@gmail.com>2021-05-05 10:27:06 -0300
commit15bc41061a5227a8e057f1dee0741dc434caf4d3 (patch)
tree19a8cd45914347e6365efc64a0e9c5facb542ba2 /src/testing
parent1d2889009dc16212751f014bc82f083ce8e48af8 (diff)
downloadmerchant-15bc41061a5227a8e057f1dee0741dc434caf4d3.tar.gz
merchant-15bc41061a5227a8e057f1dee0741dc434caf4d3.tar.bz2
merchant-15bc41061a5227a8e057f1dee0741dc434caf4d3.zip
merchant cannot create an order if the first wire method is not active
Diffstat (limited to 'src/testing')
-rwxr-xr-xsrc/testing/test_merchant_order_creation.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/testing/test_merchant_order_creation.sh b/src/testing/test_merchant_order_creation.sh
index 6de4a1d0..13966879 100755
--- a/src/testing/test_merchant_order_creation.sh
+++ b/src/testing/test_merchant_order_creation.sh
@@ -4,10 +4,12 @@
. initialize_taler_system.sh
echo -n "Configuring merchant instance ..."
+
+# create with 2 address
STATUS=$(curl -H "Content-Type: application/json" -X POST \
-H 'Authorization: Bearer secret-token:super_secret' \
http://localhost:9966/private/instances \
- -d '{"auth":{"method":"external"},"payto_uris":["payto://x-taler-bank/localhost:8082/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1", "default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms" : 50000},"default_pay_delay":{"d_ms": 60000}}' \
+ -d '{"auth":{"method":"external"},"payto_uris":["payto://x-taler-bank/localhost:8082/43","payto://x-taler-bank/localhost:8082/44"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1", "default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms" : 50000},"default_pay_delay":{"d_ms": 60000}}' \
-w "%{http_code}" -s -o /dev/null)
if [ "$STATUS" != "204" ]
@@ -15,6 +17,22 @@ then
echo 'should respond ok, instance created. got:' $STATUS
exit 1
fi
+
+# remove one account address
+STATUS=$(curl -H "Content-Type: application/json" -X PATCH \
+ -H 'Authorization: Bearer secret-token:super_secret' \
+ http://localhost:9966/instances/default/private/ \
+ -d '{"auth":{"method":"external"},"payto_uris":["payto://x-taler-bank/localhost:8082/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1", "default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms" : 50000},"default_pay_delay":{"d_ms": 60000}}' \
+ -w "%{http_code}" -s -o /dev/null)
+
+if [ "$STATUS" != "204" ]
+then
+ echo 'should respond ok, instance updated. got:' $STATUS
+ exit 1
+fi
+
+
+
echo OK
RANDOM_IMG='data:image/png;base64,abcdefg'