diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/handlers/echo_h.erl | 1 | ||||
-rw-r--r-- | test/req_SUITE.erl | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/test/handlers/echo_h.erl b/test/handlers/echo_h.erl index f50bc79..d04d531 100644 --- a/test/handlers/echo_h.erl +++ b/test/handlers/echo_h.erl @@ -86,6 +86,7 @@ echo(<<"match">>, Req, Opts) -> Fields = [binary_to_atom(F, latin1) || F <- Fields0], Value = case Type of <<"qs">> -> cowboy_req:match_qs(Fields, Req); + <<"qs_with_constraints">> -> cowboy_req:match_qs([{id, integer}], Req); <<"cookies">> -> cowboy_req:match_cookies(Fields, Req); <<"body_qs">> -> %% Note that the Req should not be discarded but for the diff --git a/test/req_SUITE.erl b/test/req_SUITE.erl index 6e111bb..183bd4b 100644 --- a/test/req_SUITE.erl +++ b/test/req_SUITE.erl @@ -266,6 +266,7 @@ match_qs(Config) -> end, %% Ensure match errors result in a 400 response. {400, _, _} = do_get("/match/qs/a/c?a=b", [], Config), + {400, _, _} = do_get("/match/qs_with_constraints", [], Config), %% This function is tested more extensively through unit tests. ok. |