aboutsummaryrefslogtreecommitdiffstats
path: root/test/ws_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-01-28 16:53:09 +0100
committerLoïc Hoguin <[email protected]>2013-01-28 16:53:09 +0100
commita357c49d1bdbc524a9cdf1f11b9aed66cac47f59 (patch)
treea41482169e7507504deffe678a9201d2d6ef8038 /test/ws_SUITE.erl
parent68da864aeb41746cb1a935f3b505a494e0abb259 (diff)
downloadcowboy-a357c49d1bdbc524a9cdf1f11b9aed66cac47f59.tar.gz
cowboy-a357c49d1bdbc524a9cdf1f11b9aed66cac47f59.tar.bz2
cowboy-a357c49d1bdbc524a9cdf1f11b9aed66cac47f59.zip
New routing
Ultimately few things change, it's mostly just a nicer syntax and slightly different expectations. The name of the value `dispatch` did not change, because the previous dispatch values will now fail if the code is not updated to using `cowboy_router:compile/1`. No constraints have been implemented in this commit.
Diffstat (limited to 'test/ws_SUITE.erl')
-rw-r--r--test/ws_SUITE.erl24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/ws_SUITE.erl b/test/ws_SUITE.erl
index 61bb236..06d4b3e 100644
--- a/test/ws_SUITE.erl
+++ b/test/ws_SUITE.erl
@@ -88,35 +88,35 @@ end_per_group(Listener, _Config) ->
%% Dispatch configuration.
init_dispatch() ->
- [
- {[<<"localhost">>], [
- {[<<"websocket">>], websocket_handler, []},
- {[<<"ws_echo_handler">>], websocket_echo_handler, []},
- {[<<"ws_init_shutdown">>], websocket_handler_init_shutdown, []},
- {[<<"ws_send_many">>], ws_send_many_handler, [
+ cowboy_router:compile([
+ {"localhost", [
+ {"/websocket", websocket_handler, []},
+ {"/ws_echo_handler", websocket_echo_handler, []},
+ {"/ws_init_shutdown", websocket_handler_init_shutdown, []},
+ {"/ws_send_many", ws_send_many_handler, [
{sequence, [
{text, <<"one">>},
{text, <<"two">>},
{text, <<"seven!">>}]}
]},
- {[<<"ws_send_close">>], ws_send_many_handler, [
+ {"/ws_send_close", ws_send_many_handler, [
{sequence, [
{text, <<"send">>},
close,
{text, <<"won't be received">>}]}
]},
- {[<<"ws_send_close_payload">>], ws_send_many_handler, [
+ {"/ws_send_close_payload", ws_send_many_handler, [
{sequence, [
{text, <<"send">>},
{close, 1001, <<"some text!">>},
{text, <<"won't be received">>}]}
]},
- {[<<"ws_timeout_hibernate">>], ws_timeout_hibernate_handler, []},
- {[<<"ws_timeout_cancel">>], ws_timeout_cancel_handler, []},
- {[<<"ws_upgrade_with_opts">>], ws_upgrade_with_opts_handler,
+ {"/ws_timeout_hibernate", ws_timeout_hibernate_handler, []},
+ {"/ws_timeout_cancel", ws_timeout_cancel_handler, []},
+ {"/ws_upgrade_with_opts", ws_upgrade_with_opts_handler,
<<"failure">>}
]}
- ].
+ ]).
%% ws and wss.