summaryrefslogtreecommitdiff
path: root/src/testing/test_exchange_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-08-13 00:45:02 +0200
committerChristian Grothoff <christian@grothoff.org>2020-08-13 00:45:02 +0200
commit4e0b5104382a1271261a24c4b97cb50f63aea976 (patch)
tree1277741e531ce9df2677e0faae2be395af7b5494 /src/testing/test_exchange_api.c
parent6256bdb15a7c43b644132ae8c78adf31bcae4d28 (diff)
downloadexchange-4e0b5104382a1271261a24c4b97cb50f63aea976.tar.gz
exchange-4e0b5104382a1271261a24c4b97cb50f63aea976.tar.bz2
exchange-4e0b5104382a1271261a24c4b97cb50f63aea976.zip
extend tests to discover corner cases from #6478, fix code to actually work for those cases
Diffstat (limited to 'src/testing/test_exchange_api.c')
-rw-r--r--src/testing/test_exchange_api.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/testing/test_exchange_api.c b/src/testing/test_exchange_api.c
index e410b1805..d30597b20 100644
--- a/src/testing/test_exchange_api.c
+++ b/src/testing/test_exchange_api.c
@@ -552,20 +552,35 @@ run (void *cls,
* fakebank and the second to actually check there are not
* other transfers around. *///
TALER_TESTING_cmd_check_bank_empty ("check_bank_transfer-pre-refund"),
- TALER_TESTING_cmd_refund ("refund-ok",
- MHD_HTTP_OK,
- "EUR:5",
- "deposit-refund-1"),
- TALER_TESTING_cmd_refund ("refund-ok-double",
- MHD_HTTP_OK,
- "EUR:5",
- "deposit-refund-1"),
+ TALER_TESTING_cmd_refund_with_id ("refund-ok",
+ MHD_HTTP_OK,
+ "EUR:3",
+ "deposit-refund-1",
+ 3),
+ TALER_TESTING_cmd_refund_with_id ("refund-ok-double",
+ MHD_HTTP_OK,
+ "EUR:3",
+ "deposit-refund-1",
+ 3),
/* Previous /refund(s) had id == 0. */
TALER_TESTING_cmd_refund_with_id ("refund-conflicting",
MHD_HTTP_CONFLICT,
"EUR:5",
"deposit-refund-1",
1),
+ TALER_TESTING_cmd_deposit ("deposit-refund-insufficient-refund",
+ "withdraw-coin-r1",
+ 0,
+ bc.user42_payto,
+ "{\"items\":[{\"name\":\"ice cream\",\"value\":\"EUR:4\"}]}",
+ GNUNET_TIME_UNIT_MINUTES,
+ "EUR:4",
+ MHD_HTTP_CONFLICT),
+ TALER_TESTING_cmd_refund_with_id ("refund-ok-increase",
+ MHD_HTTP_OK,
+ "EUR:2",
+ "deposit-refund-1",
+ 2),
/**
* Spend 4.99 EUR of the refunded 4.99 EUR coin (1ct gone
* due to refund) (merchant would receive EUR:4.98 due to