[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 03/04: Attempting refund increase on a non
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 03/04: Attempting refund increase on a non existent order id. |
Date: |
Tue, 22 May 2018 08:59:25 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
commit 11c2eb216866721083e4764d09628e1b0092e0a7
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon May 21 14:49:10 2018 +0200
Attempting refund increase on a non existent order id.
---
src/lib/merchant_api_refund.c | 5 +++--
src/lib/test_merchant_api_new.c | 10 ++++++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/lib/merchant_api_refund.c b/src/lib/merchant_api_refund.c
index e3a09d6..812176f 100644
--- 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
index 2c8b953..d598b37 100644
--- 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",
--
To stop receiving notification emails like this one, please contact
address@hidden