mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Fix tests for cowboy_dispatcher:split_path/1.
This commit is contained in:
parent
8e55c2e2b8
commit
0b13835bfe
1 changed files with 9 additions and 9 deletions
|
@ -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 = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue