diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-02-13 15:15:07 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-02-13 15:15:07 +0100 |
commit | 405b696e57c3e35a72046f01896fb1c5c0cc46e6 (patch) | |
tree | ca1d65ec9136bca7e4a7b0e256b21d55e852350e /src | |
parent | d60d537dfc506590a1fc8c2872fe5a66097718c4 (diff) | |
download | merchant-405b696e57c3e35a72046f01896fb1c5c0cc46e6.tar.gz merchant-405b696e57c3e35a72046f01896fb1c5c0cc46e6.tar.bz2 merchant-405b696e57c3e35a72046f01896fb1c5c0cc46e6.zip |
Testing replayed payment.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/test_merchant_api.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c index 286f0022..f0fca8ea 100644 --- 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", |