1
0
mirror of synced 2025-07-27 23:41:48 +03:00
This commit is contained in:
yhirose
2019-07-19 11:38:06 -04:00
parent 3d1ae3a3af
commit eaafa5d55c
3 changed files with 57 additions and 7 deletions

View File

@ -327,8 +327,9 @@ TEST(BaseAuthTest, FromHTTPWatch) {
}
{
httplib::Headers headers = {{"Authorization", "Basic aGVsbG86d29ybGQ="}};
auto res = cli.Get("/basic-auth/hello/world", headers);
auto res = cli.Get("/basic-auth/hello/world", {
httplib::make_basic_authentication_header("hello", "world")
});
ASSERT_TRUE(res != nullptr);
EXPECT_EQ(res->body,
"{\n \"authenticated\": true, \n \"user\": \"hello\"\n}\n");