Skip to content
Snippets Groups Projects
Verified Commit 4fab4121 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Add tests for delete with body

parent 047199b7
No related branches found
No related tags found
No related merge requests found
Pipeline #1910 passed
......@@ -191,3 +191,13 @@ TEST_CASE("Basic simple DELETE request") {
CHECK(r.response_code() == 200);
});
}
TEST_CASE("Basic simple DELETE request with body") {
Client g{};
g.delete_("http://localhost:5000/delete", "hello", "text/plain", [](const Request &r) {
CHECK(r.url() == "http://localhost:5000/delete");
CHECK(r.response_code() == 200);
CHECK(r.response() == "hello");
});
}
......@@ -208,3 +208,14 @@ TEST_CASE("Basic simple DELETE request") {
CHECK(r.response_code() == 200);
});
}
TEST_CASE("Basic simple DELETE request with body") {
Client g{};
g.set_verify_peer(false);
g.delete_("https://localhost:5443/delete", "hello", "text/plain", [](const Request &r) {
CHECK(r.url() == "https://localhost:5443/delete");
CHECK(r.response_code() == 200);
CHECK(r.response() == "hello");
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment