added test for 405 code on wrong method

This commit is contained in:
The-EDev 2020-10-15 01:24:26 +03:00
parent 4e5d43696b
commit 88904e4716

View File

@ -408,6 +408,17 @@ TEST(http_method)
ASSERT_NOTEQUAL("get", res.body); ASSERT_NOTEQUAL("get", res.body);
} }
{
request req;
response res;
req.url = "/get_only";
req.method = "POST"_method;
app.handle(req, res);
ASSERT_EQUAL(405, res.code);
}
} }
TEST(server_handling_error_request) TEST(server_handling_error_request)