commit 26f8dda0fe79159fcb47acb9706d8dad8a2426dc
parent 9e9dd55378307cc60af60a1bd4d7212ac2cdead6
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 1 Nov 2017 12:03:57 +0100
test tip_enable API
Diffstat:
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/lib/merchant_api_tip_enable.c b/src/lib/merchant_api_tip_enable.c
@@ -145,6 +145,7 @@ TALER_MERCHANT_tip_enable (struct GNUNET_CURL_Context *ctx,
CURL *eh;
json_t *te_obj;
+ (void) GNUNET_TIME_round_abs (&expiration);
teo = GNUNET_new (struct TALER_MERCHANT_TipEnableOperation);
teo->ctx = ctx;
teo->cb = enable_cb;
diff --git a/src/lib/reserve_tip.priv b/src/lib/reserve_tip.priv
Binary files differ.
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
@@ -3108,6 +3108,16 @@ run (void *cls)
.details.admin_add_incoming.transfer_details
= "{ \"uuid\": 100}",
.details.admin_add_incoming.amount = "EUR:10.02" },
+ { .oc = OC_TIP_ENABLE,
+ .label = "enable-tip-1",
+ .expected_response_code = MHD_HTTP_OK,
+ .details.tip_enable.admin_add_incoming_ref = "create-reserve-tip-1",
+ .details.tip_enable.amount = "EUR:5.01" },
+ { .oc = OC_TIP_ENABLE,
+ .label = "enable-tip-2",
+ .expected_response_code = MHD_HTTP_OK,
+ .details.tip_enable.admin_add_incoming_ref = "create-reserve-tip-1",
+ .details.tip_enable.amount = "EUR:5.01" },
/* Fill reserve with EUR:5.01, as withdraw fee is 1 ct per