diff options
author | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-07-21 16:45:06 -0400 |
---|---|---|
committer | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-07-21 16:45:06 -0400 |
commit | aeef085a936545f26c5be60b33e2d9e05b862492 (patch) | |
tree | 961077a2aebe3ac7a2e5b1c445b985c859ec61be /src/testing/test_merchant_api.c | |
parent | 9b943e700bf01d3cd45d0b69e93cc4e586a041d0 (diff) | |
download | merchant-aeef085a936545f26c5be60b33e2d9e05b862492.tar.gz merchant-aeef085a936545f26c5be60b33e2d9e05b862492.tar.bz2 merchant-aeef085a936545f26c5be60b33e2d9e05b862492.zip |
fully implement forget + some tests
Diffstat (limited to 'src/testing/test_merchant_api.c')
-rw-r--r-- | src/testing/test_merchant_api.c | 51 |
1 files changed, 37 insertions, 14 deletions
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c index b0ac2301..78377749 100644 --- a/src/testing/test_merchant_api.c +++ b/src/testing/test_merchant_api.c @@ -262,9 +262,7 @@ run (void *cls, "EUR:5.0", "x-taler-bank", "", - "", - "max_fee", - NULL), + ""), TALER_TESTING_cmd_merchant_claim_order ("reclaim-1", merchant_url, MHD_HTTP_OK, @@ -313,12 +311,12 @@ run (void *cls, "withdraw-coin-1", "EUR:5", "EUR:4.99"), - TALER_TESTING_cmd_merchant_forget_order ("forget-p3", + TALER_TESTING_cmd_merchant_forget_order ("forget-1", merchant_url, MHD_HTTP_OK, "create-proposal-1", NULL, - "$.max_fee", + "$.dummy_obj", NULL), TALER_TESTING_cmd_merchant_forget_order ("forget-unforgettable", merchant_url, @@ -327,15 +325,44 @@ run (void *cls, NULL, "$.amount", NULL), + TALER_TESTING_cmd_merchant_forget_order ("forget-order-nx", + merchant_url, + MHD_HTTP_NOT_FOUND, + NULL, + "nx-order", + "$.dummy_obj", + NULL), + TALER_TESTING_cmd_merchant_forget_order ("forget-order-array-elem", + merchant_url, + MHD_HTTP_OK, + "create-proposal-1", + NULL, + "$.dummy_array[0].item", + NULL), + TALER_TESTING_cmd_merchant_forget_order ("forget-order-array-wc", + merchant_url, + MHD_HTTP_OK, + "create-proposal-1", + NULL, + "$.dummy_array[*].item", + NULL), + TALER_TESTING_cmd_merchant_forget_order ("forget-order-malformed", + merchant_url, + MHD_HTTP_BAD_REQUEST, + "create-proposal-1", + NULL, + "$.dummy_array[abc].item", + NULL), TALER_TESTING_cmd_poll_order_conclude ("poll-order-merchant-1-conclude", MHD_HTTP_OK, "poll-order-merchant-1-start"), + /* TALER_TESTING_cmd_wallet_get_order ("get-order-wallet-1-2", merchant_url, "create-proposal-1", true, false, - MHD_HTTP_OK), + MHD_HTTP_OK),*/ /*TALER_TESTING_cmd_merchant_get_order ("get-order-merchant-1-2", merchant_url, "create-proposal-1", @@ -415,8 +442,7 @@ run (void *cls, "EUR:5.0", "unsupported-wire-method", "product-3/2", - "", - NULL), + ""), TALER_TESTING_cmd_merchant_post_orders2 ("create-proposal-p3-pd-nx", merchant_url, MHD_HTTP_NOT_FOUND, @@ -426,8 +452,7 @@ run (void *cls, "EUR:5.0", "x-taler-bank", "unknown-product/2", - "", - NULL), + ""), TALER_TESTING_cmd_merchant_post_orders2 ( "create-proposal-p3-not-enough-stock", merchant_url, @@ -438,8 +463,7 @@ run (void *cls, "EUR:5.0", "x-taler-bank", "product-3/24", - "", - NULL), + ""), TALER_TESTING_cmd_merchant_post_orders2 ("create-proposal-p3", merchant_url, MHD_HTTP_OK, @@ -449,8 +473,7 @@ run (void *cls, "EUR:5.0", "x-taler-bank", "product-3/3", - "lock-product-p3", - NULL), + "lock-product-p3"), TALER_TESTING_cmd_merchant_delete_order ("delete-order-1", merchant_url, "1", |