Skip to content

Commit

Permalink
fix set_resp_cookies test
Browse files Browse the repository at this point in the history
  • Loading branch information
geeksilva97 committed Jan 19, 2024
1 parent 5fe1be7 commit 966818a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/req_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -790,18 +790,18 @@ set_resp_cookie(Config) ->
doc("Response using set_resp_cookie."),
%% Single cookie, no options.
{200, Headers1, _} = do_get("/resp/set_resp_cookie3", Config),
{_, <<"mycookie=myvalue">>}
{_, <<"mycookie=myvalue; Version=1">>}
= lists:keyfind(<<"set-cookie">>, 1, Headers1),
%% Single cookie, with options.
{200, Headers2, _} = do_get("/resp/set_resp_cookie4", Config),
{_, <<"mycookie=myvalue; Path=/resp/set_resp_cookie4">>}
{_, <<"mycookie=myvalue; Version=1; Path=/resp/set_resp_cookie4">>}
= lists:keyfind(<<"set-cookie">>, 1, Headers2),
%% Multiple cookies.
{200, Headers3, _} = do_get("/resp/set_resp_cookie3/multiple", Config),
[_, _] = [H || H={<<"set-cookie">>, _} <- Headers3],
%% Overwrite previously set cookie.
{200, Headers4, _} = do_get("/resp/set_resp_cookie3/overwrite", Config),
{_, <<"mycookie=overwrite">>}
{_, <<"mycookie=overwrite; Version=1">>}
= lists:keyfind(<<"set-cookie">>, 1, Headers4),
ok.

Expand Down

0 comments on commit 966818a

Please sign in to comment.