1
0
mirror of https://github.com/lammertb/libhttp.git synced 2026-01-03 16:02:30 +03:00

Adapt unit test for NO_FILES build

A PUT request without login will return 401 (Not Authorized) if there is a file system,
and 405 (Method Not Allowed) if there is no file system (= NO_FILES defined).
This commit is contained in:
bel
2015-08-06 22:49:22 +02:00
parent 516e40e607
commit 2c5025f52d

View File

@@ -573,7 +573,11 @@ START_TEST(test_request_handlers)
ri = mg_get_request_info(conn);
ck_assert(ri != NULL);
#if defined(NO_FILES)
ck_assert_str_eq(ri->uri, "405"); /* method not allowed */
#else
ck_assert_str_eq(ri->uri, "401"); /* not authorized */
#endif
mg_close_connection(conn);