commit 405b696e57c3e35a72046f01896fb1c5c0cc46e6
parent d60d537dfc506590a1fc8c2872fe5a66097718c4
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Mon, 13 Feb 2017 15:15:07 +0100
Testing replayed payment.
Diffstat:
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
@@ -2294,6 +2294,7 @@ run (void *cls)
\"summary\": \"merchant-lib testcase\",\
\"products\":\
[ {\"description\":\"ice cream\", \"value\":\"{EUR:5}\"} ] }"},
+
{ .oc = OC_PAY,
.label = "deposit-simple",
.expected_response_code = MHD_HTTP_OK,
@@ -2302,6 +2303,15 @@ run (void *cls)
.details.pay.amount_with_fee = "EUR:5",
.details.pay.amount_without_fee = "EUR:4.99" },
+ /* Try to replay payment reusing coin */
+ { .oc = OC_PAY,
+ .label = "replay-simple",
+ .expected_response_code = MHD_HTTP_OK,
+ .details.pay.contract_ref = "create-proposal-1",
+ .details.pay.coin_ref = "withdraw-coin-1",
+ .details.pay.amount_with_fee = "EUR:5",
+ .details.pay.amount_without_fee = "EUR:4.99" },
+
/* Create another contract */
{ .oc = OC_PROPOSAL,
@@ -2352,7 +2362,7 @@ run (void *cls)
.details.reserve_withdraw.reserve_reference = "create-reserve-2",
.details.reserve_withdraw.amount = "EUR:5" },
- /* Fetch contract-1 */
+ /* Proposal lookup */
{
.oc = OC_PROPOSAL_LOOKUP,
.label = "fetch-proposal-2",