From 452f20d71ef5c659c269389a4156f462521737ed Mon Sep 17 00:00:00 2001 From: Jonathan Buchanan Date: Thu, 13 Aug 2020 03:50:15 -0400 Subject: test for increasing refunds multiple times --- src/testing/test_merchant_api.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/testing/test_merchant_api.c') diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c index ead0ba71..0e99fb47 100644 --- a/src/testing/test_merchant_api.c +++ b/src/testing/test_merchant_api.c @@ -618,6 +618,7 @@ run (void *cls, const char *order_1r_refunds[] = { "refund-increase-1r", + "refund-increase-1r-2", NULL }; struct TALER_TESTING_Command refund[] = { @@ -683,6 +684,21 @@ run (void *cls, MHD_HTTP_OK, "refund-increase-1r", NULL), + TALER_TESTING_cmd_merchant_order_refund ("refund-increase-1r-2", + merchant_url, + "refund test 2", + "1r", /* order ID */ + "EUR:1.0", + MHD_HTTP_OK), + TALER_TESTING_cmd_wallet_get_order ("get-order-wallet-1r-2", + merchant_url, + "create-proposal-1r", + true, + true, + MHD_HTTP_OK, + "refund-increase-1r", + "refund-increase-1r-2", + NULL), TALER_TESTING_cmd_merchant_get_order ("get-order-merchant-1r", merchant_url, "create-proposal-1r", @@ -690,6 +706,7 @@ run (void *cls, true, MHD_HTTP_OK, "refund-increase-1r", + "refund-increase-1r-2", NULL), TALER_TESTING_cmd_merchant_get_order2 ("get-order-merchant-1r-2", merchant_url, @@ -785,8 +802,9 @@ run (void *cls, TALER_TESTING_cmd_check_bank_transfer ( "check_bank_transfer-paid-unincreased-refund", EXCHANGE_URL, - "EUR:9.88", /* '4.98 from above', plus 4.99 from 'pay-for-refund-1r' - and MINUS 0.1 PLUS 0.01 (deposit fee) from 'refund-increase-1r' */ + "EUR:8.98", /* '4.98 from above', plus 4.99 from 'pay-for-refund-1r' + and MINUS 0.1 MINUS 0.9 PLUS 0.01 (deposit fee) from + 'refund-increase-1r' and 'refund-increase-1r-2' */ exchange_payto, merchant_payto), /* Actually try to pick up the refund from the "unincreased proposal". */ -- cgit v1.2.3