diff options
author | Loïc Hoguin <[email protected]> | 2016-06-14 16:23:51 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-06-14 16:23:51 +0200 |
commit | 84fb85e2e4bc91d2dfc0da04674d96db34089a05 (patch) | |
tree | 386ea385dae9490cab9763387e4b93e9156f7f19 /test/examples_SUITE.erl | |
parent | a55679b231b61e7d2269142efa337ae6face2343 (diff) | |
download | cowboy-84fb85e2e4bc91d2dfc0da04674d96db34089a05.tar.gz cowboy-84fb85e2e4bc91d2dfc0da04674d96db34089a05.tar.bz2 cowboy-84fb85e2e4bc91d2dfc0da04674d96db34089a05.zip |
Fix cookie example
Diffstat (limited to 'test/examples_SUITE.erl')
-rw-r--r-- | test/examples_SUITE.erl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/examples_SUITE.erl b/test/examples_SUITE.erl index b946625..6caa7ef 100644 --- a/test/examples_SUITE.erl +++ b/test/examples_SUITE.erl @@ -135,6 +135,24 @@ do_chunked_hello_world(Transport, Protocol, Config) -> ok end. +%% Cookie. + +cookie(Config) -> + doc("Cookie example."), + try + do_compile_and_start(cookie), + do_cookie(tcp, http, Config), + do_cookie(tcp, http2, Config) + after + do_stop(cookie) + end. + +do_cookie(Transport, Protocol, Config) -> + {200, _, One} = do_get(Transport, Protocol, "/", Config), + {200, _, Two} = do_get(Transport, Protocol, "/", [{<<"cookie">>, <<"server=abcdef">>}], Config), + true = One =/= Two, + ok. + %% Echo GET. echo_get(Config) -> |