diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-13 00:45:02 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-13 00:45:02 +0200 |
commit | 4e0b5104382a1271261a24c4b97cb50f63aea976 (patch) | |
tree | 1277741e531ce9df2677e0faae2be395af7b5494 /src/testing | |
parent | 6256bdb15a7c43b644132ae8c78adf31bcae4d28 (diff) | |
download | exchange-4e0b5104382a1271261a24c4b97cb50f63aea976.tar.xz |
extend tests to discover corner cases from #6478, fix code to actually work for those cases
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/test_exchange_api.c | 31 |
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 |