commit 15bc41061a5227a8e057f1dee0741dc434caf4d3
parent 1d2889009dc16212751f014bc82f083ce8e48af8
Author: Sebastian <sebasjm@gmail.com>
Date: Wed, 5 May 2021 10:26:25 -0300
merchant cannot create an order if the first wire method is not active
Diffstat:
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git 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'