commit ef859872fc76b3cfdef0af58e949db3be5ccb66a
parent 4af1f17d6609f89e73f203e21cd4cbf0bfe13005
Author: bohdan-potuzhnyi <bohdan.potuzhnyi@gmail.com>
Date: Mon, 16 Dec 2024 14:14:50 +0100
adding tests for the delete donau in the test api suite
Diffstat:
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h
@@ -1828,6 +1828,24 @@ TALER_TESTING_cmd_merchant_post_donau_instance(const char *label,
unsigned int expected_http_status,
...);
+
+/**
+ * Define a "DELETE /donau/$charity_id" CMD.
+ *
+ * @param label command label.
+ * @param url base URL of the Donau service serving the
+ * DELETE /donau/$charity_id request.
+ * @param charity_id the ID of the charity to delete.
+ * @param expected_http_status expected HTTP response code.
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_merchant_delete_donau_instance(const char *label,
+ const char *url,
+ uint64_t charity_id,
+ unsigned int expected_http_status);
+
+
/* ****** Specific traits supported by this component ******* */
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c
@@ -1825,6 +1825,11 @@ run (void *cls,
"post-donau-instance",
merchant_url,
MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_delete_donau_instance(
+ "delete-donau-instance",
+ merchant_url,
+ 123,
+ MHD_HTTP_NO_CONTENT),
TALER_TESTING_cmd_merchant_get_donau_instances(
"get-donau-instances-after-delete",
merchant_url,