commit 11c2eb216866721083e4764d09628e1b0092e0a7
parent 07f3974c54b8bf4084ddc452cf1f10263c20050d
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Mon, 21 May 2018 14:49:10 +0200
Attempting refund increase on a non existent order id.
Diffstat:
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/lib/merchant_api_refund.c b/src/lib/merchant_api_refund.c
@@ -122,10 +122,11 @@ handle_refund_increase_finished (void *cls,
"Backend didn't even return from POST /refund\n");
return;
- /* Tolerate Bad Request here in order to let
- * test cases move along. */
+ /* Good to hand everything to the callback, as all
+ * the logic is actually there. */
case MHD_HTTP_OK:
case MHD_HTTP_BAD_REQUEST:
+ case MHD_HTTP_NOT_FOUND:
rio->cb (rio->cb_cls,
response_code,
TALER_EC_NONE,
diff --git a/src/lib/test_merchant_api_new.c b/src/lib/test_merchant_api_new.c
@@ -506,6 +506,16 @@ run (void *cls,
"EUR:0.01",
MHD_HTTP_BAD_REQUEST),
+ TALER_TESTING_cmd_refund_increase
+ ("refund-increase-unpaid-proposal",
+ merchant_url,
+ is->ctx,
+ "refund test",
+ "non-existent-id",
+ "EUR:0.1",
+ "EUR:0.01",
+ MHD_HTTP_NOT_FOUND),
+
/* Test tipping. */
TALER_TESTING_cmd_fakebank_transfer_with_instance
("create-reserve-tip-1",