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:
@@ -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);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user