aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_dispatcher.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_dispatcher.erl')
-rw-r--r--src/cowboy_dispatcher.erl18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cowboy_dispatcher.erl b/src/cowboy_dispatcher.erl
index eb2355a..8370d31 100644
--- a/src/cowboy_dispatcher.erl
+++ b/src/cowboy_dispatcher.erl
@@ -121,17 +121,17 @@ split_host_test_() ->
split_path_test_() ->
%% {Path, Result, QueryString}
Tests = [
- {"?", [], []},
- {"???", [], "??"},
- {"/", [], []},
- {"/users", ["users"], []},
- {"/users?", ["users"], []},
- {"/users?a", ["users"], "a"},
+ {"?", [], "", ""},
+ {"???", [], "", "??"},
+ {"/", [], "/", ""},
+ {"/users", ["users"], "/users", ""},
+ {"/users?", ["users"], "/users", ""},
+ {"/users?a", ["users"], "/users", "a"},
{"/users/42/friends?a=b&c=d&e=notsure?whatever",
- ["users", "42", "friends"], "a=b&c=d&e=notsure?whatever"}
+ ["users", "42", "friends"],
+ "/users/42/friends", "a=b&c=d&e=notsure?whatever"}
],
- [{"atom '*'", fun() -> {'*', []} = split_path('*') end}]
- ++ [{P, fun() -> {R, Qs} = split_path(P) end} || {P, R, Qs} <- Tests].
+ [{P, fun() -> {R, RawP, Qs} = split_path(P) end} || {P, R, RawP, Qs} <- Tests].
match_test_() ->
Dispatch = [