From 84fb85e2e4bc91d2dfc0da04674d96db34089a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 14 Jun 2016 16:23:51 +0200 Subject: Fix cookie example --- test/examples_SUITE.erl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') 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) -> -- cgit v1.2.3