From 5fc73243ed3a3984ebf95083925571f38b00c9a8 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Tue, 25 Jul 2017 16:37:14 +0200 Subject: Checking that a contract whose payment didn't get through doesn't belong to /history response. --- src/lib/test_merchant_api.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c index b533a9f4..81607f15 100644 --- a/src/lib/test_merchant_api.c +++ b/src/lib/test_merchant_api.c @@ -2565,7 +2565,21 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99" }, - + + { .oc = OC_HISTORY, + .label = "history-0", + .expected_response_code = MHD_HTTP_OK, + /** + * all records to be returned; setting date as 0 lets the + * interpreter set it as 'now' + one hour delta, just to + * make sure it surpasses the proposal's timestamp. + */ + .details.history.date.abs_value_us = 0, + .details.history.nresult = 1, + .details.history.start = 10, + .details.history.nrows = 10 + }, + /* Fill second reserve with EUR:1 */ { .oc = OC_ADMIN_ADD_INCOMING, .label = "create-reserve-2", @@ -2714,16 +2728,12 @@ run (void *cls) { .oc = OC_HISTORY, .label = "history-1", .expected_response_code = MHD_HTTP_OK, - /** - * all records to be returned; setting date as 0 lets the interpreter - * set it as 'now' + one hour delta, just to make sure it surpasses the - * proposal's timestamp. - */ .details.history.date.abs_value_us = 0, .details.history.nresult = 2, .details.history.start = 10, .details.history.nrows = 10 }, + { .oc = OC_HISTORY, .label = "history-2", .expected_response_code = MHD_HTTP_OK, @@ -2733,6 +2743,7 @@ run (void *cls) .details.history.start = 10, .details.history.nrows = 10 }, + { .oc = OC_REFUND_INCREASE, .label = "refund-increase-1", .details.refund_increase.refund_amount = "EUR:0.1", -- cgit v1.2.3