From c3c5f0000f7b474738b08f34308c1e8a4060ce14 Mon Sep 17 00:00:00 2001 From: Kamil Kisiel Date: Thu, 6 Aug 2015 22:12:38 -0700 Subject: [PATCH] Add test which used to fail for queries. Fixes #66 --- mux_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mux_test.go b/mux_test.go index ba47727..caeaa46 100644 --- a/mux_test.go +++ b/mux_test.go @@ -660,6 +660,15 @@ func TestQueries(t *testing.T) { path: "", shouldMatch: true, }, + { + title: "Queries route, bad submatch", + route: new(Route).Queries("foo", "bar", "baz", "ding"), + request: newRequest("GET", "http://localhost?fffoo=bar&baz=dingggg"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, } for _, test := range tests {