summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-07-25 16:37:14 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-07-25 16:37:14 +0200
commit5fc73243ed3a3984ebf95083925571f38b00c9a8 (patch)
tree30f05985f2594dea35fe65874b5ecebd621a6473
parent1a930818434c5a82aa620d6e861969374232ee61 (diff)
downloadmerchant-5fc73243ed3a3984ebf95083925571f38b00c9a8.tar.gz
merchant-5fc73243ed3a3984ebf95083925571f38b00c9a8.tar.bz2
merchant-5fc73243ed3a3984ebf95083925571f38b00c9a8.zip
Checking that a contract whose payment didn't get through
doesn't belong to /history response.
-rw-r--r--src/lib/test_merchant_api.c23
1 files 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",