From 5d911931d53442bb09b7e0033bc58600042673ec Mon Sep 17 00:00:00 2001 From: Carl Jackson Date: Sat, 12 Apr 2014 21:04:45 +0100 Subject: [PATCH] Also fix URLParams in tests --- web/middleware_test.go | 2 +- web/mux_test.go | 2 +- web/pattern_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/middleware_test.go b/web/middleware_test.go index 548e9b9..4e68c41 100644 --- a/web/middleware_test.go +++ b/web/middleware_test.go @@ -214,7 +214,7 @@ func TestContext(t *testing.T) { } st.Use(func(c *C, h http.Handler) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { - if c.Env != nil || c.UrlParams != nil { + if c.Env != nil || c.URLParams != nil { t.Error("Expected a clean context") } c.Env = make(map[string]interface{}) diff --git a/web/mux_test.go b/web/mux_test.go index 6e6619c..1854524 100644 --- a/web/mux_test.go +++ b/web/mux_test.go @@ -25,7 +25,7 @@ func TestIfItWorks(t *testing.T) { greeting = g.(string) } } - ch <- greeting + c.UrlParams["name"] + ch <- greeting + c.URLParams["name"] }) r, _ := http.NewRequest("GET", "/hello/carl", nil) diff --git a/web/pattern_test.go b/web/pattern_test.go index 0377ab0..2ea3c90 100644 --- a/web/pattern_test.go +++ b/web/pattern_test.go @@ -17,7 +17,7 @@ func pt(url string, match bool, params map[string]string) patternTest { r: req, match: match, c: &C{}, - cout: &C{UrlParams: params}, + cout: &C{URLParams: params}, } }