summaryrefslogtreecommitdiff
path: root/src/lib/test_merchant_api_new.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-03-23 16:16:55 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-03-23 16:16:55 +0100
commit6d4afede86554e04fe87446a68df541234c870f3 (patch)
tree1334cc93eaa98652f46cdc1334757e9d70171e1d /src/lib/test_merchant_api_new.c
parentdfd4806100b0f3dc4f5947b3a85872b08d64981b (diff)
downloadmerchant-6d4afede86554e04fe87446a68df541234c870f3.tar.gz
merchant-6d4afede86554e04fe87446a68df541234c870f3.tar.bz2
merchant-6d4afede86554e04fe87446a68df541234c870f3.zip
spending tip passes.
Diffstat (limited to 'src/lib/test_merchant_api_new.c')
-rw-r--r--src/lib/test_merchant_api_new.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/lib/test_merchant_api_new.c b/src/lib/test_merchant_api_new.c
index 2b6ad910..e83e100d 100644
--- a/src/lib/test_merchant_api_new.c
+++ b/src/lib/test_merchant_api_new.c
@@ -592,6 +592,40 @@ run (void *cls,
is->exchange,
TALER_EC_TIP_PICKUP_NO_FUNDS),
+ // TALER_TESTING_cmd_end (),
+
+ TALER_TESTING_cmd_proposal
+ ("create-proposal-tip-1",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "{\"max_fee\":\
+ {\"currency\":\"EUR\",\
+ \"value\":0,\
+ \"fraction\":50000000},\
+ \"order_id\":\"1-tip\",\
+ \"refund_deadline\":\"\\/Date(0)\\/\",\
+ \"pay_deadline\":\"\\/Date(99999999999)\\/\",\
+ \"amount\":\
+ {\"currency\":\"EUR\",\
+ \"value\":5,\
+ \"fraction\":0},\
+ \"summary\": \"useful product\",\
+ \"fulfillment_url\": \"https://example.com/\",\
+ \"products\": [ {\"description\":\"ice cream\",\
+ \"value\":\"{EUR:5}\"} ] }",
+ NULL),
+
+ TALER_TESTING_cmd_pay ("deposit-tip-simple",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "create-proposal-tip-1",
+ "pickup-tip-1",
+ "EUR:5", // amount + fee
+ "EUR:4.99", // amount - fee
+ "EUR:0.01"), // refund fee
+
/* Will fail here until all new
* transfers have not been checked. I.e.,
* there is now a 20.04 euro "pending" transfer. */
@@ -607,7 +641,6 @@ run (void *cls,
USER_LOGIN_PASS,
EXCHANGE_URL),
-
CMD_EXEC_WIREWATCH ("wirewatch-10"),
TALER_TESTING_cmd_check_bank_transfer