From d74abe688ba00b9692357f6cdec51729a0558b1b Mon Sep 17 00:00:00 2001 From: TheSomeMan Date: Mon, 4 Nov 2024 22:46:45 +0700 Subject: [PATCH] [#295] Fix unit-tests --- .../test_http_server_handle_req_get_auth.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_http_server_handle_req_get_auth/test_http_server_handle_req_get_auth.cpp b/tests/test_http_server_handle_req_get_auth/test_http_server_handle_req_get_auth.cpp index 1002683..151943e 100644 --- a/tests/test_http_server_handle_req_get_auth/test_http_server_handle_req_get_auth.cpp +++ b/tests/test_http_server_handle_req_get_auth/test_http_server_handle_req_get_auth.cpp @@ -164,14 +164,15 @@ TEST_F(TestHttpServerHandleReqGetAuth, test_req_get_auth_allow) // NOLINT .p_hostinfo = &hostinfo, }; - bool flag_access_by_bearer_token = false; - const http_server_resp_t resp = http_server_handle_req_check_auth( + bool flag_access_by_bearer_token = false; + + const http_server_resp_t resp = http_server_handle_req_check_auth( ¶m, &extra_header_fields, &flag_access_by_bearer_token); const string exp_json_resp = R"({"gateway_name": "RuuviGatewayEEFF", "fw_ver": "1.13.0", "nrf52_fw_ver": "1.0.0", "lan_auth_type": "lan_auth_allow", "lan": true})"; - ASSERT_EQ(HTTP_RESP_CODE_401, resp.http_resp_code); + ASSERT_EQ(HTTP_RESP_CODE_200, resp.http_resp_code); ASSERT_EQ(HTTP_CONTENT_LOCATION_STATIC_MEM, resp.content_location); ASSERT_TRUE(resp.flag_no_cache); ASSERT_TRUE(resp.flag_add_header_date);