From 0b13835bfea9107773ee06ae5914998d20ca7477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 21 Mar 2011 22:18:24 +0100 Subject: Fix tests for cowboy_dispatcher:split_path/1. --- src/cowboy_dispatcher.erl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/cowboy_dispatcher.erl') 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 = [ -- cgit v1.2.3