mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
add inform3 test
This commit is contained in:
parent
fed6c5415c
commit
76e4786171
2 changed files with 4 additions and 0 deletions
|
@ -155,6 +155,9 @@ do(<<"inform3">>, Req0, Opts) ->
|
|||
case cowboy_req:binding(arg, Req0) of
|
||||
<<"binary">> ->
|
||||
cowboy_req:inform(<<"102 On my way">>, Headers, Req0);
|
||||
<<"set_cookie">> ->
|
||||
ct_helper:ignore(cowboy_req, inform, 3),
|
||||
cowboy_req:inform(ok, #{<<"set-cookie">> => <<"name=paco loco">>}, Req0);
|
||||
<<"error">> ->
|
||||
ct_helper:ignore(cowboy_req, inform, 3),
|
||||
cowboy_req:inform(ok, Headers, Req0);
|
||||
|
|
|
@ -897,6 +897,7 @@ inform3(Config) ->
|
|||
{102, Headers, 200, _, _} = do_get_inform("/resp/inform3/102", Config),
|
||||
{102, Headers, 200, _, _} = do_get_inform("/resp/inform3/binary", Config),
|
||||
{500, _} = do_get_inform("/resp/inform3/error", Config),
|
||||
{500, _} = do_get_inform("/resp/inform3/set_cookie", Config),
|
||||
{102, Headers, 200, _, _} = do_get_inform("/resp/inform3/twice", Config),
|
||||
%% @todo How to test this properly? This isn't enough.
|
||||
{200, _} = do_get_inform("/resp/inform3/after_reply", Config),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue