From bf27dc6e969b5b3aa947eb975d842242925e08f7 Mon Sep 17 00:00:00 2001 From: Eason Lin Date: Sun, 13 Aug 2017 21:41:51 +0800 Subject: [PATCH] fix(test): rename field --- routes_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routes_test.go b/routes_test.go index 0882a4dc..22fd2e61 100644 --- a/routes_test.go +++ b/routes_test.go @@ -356,9 +356,9 @@ func TestRouterNotFound(t *testing.T) { router.GET("/", func(c *Context) {}) testRoutes := []struct { - route string - code int - header string + route string + code int + Location string }{ {"/path/", 301, "/path"}, // TSR -/ {"/dir", 301, "/dir/"}, // TSR +/ @@ -374,7 +374,7 @@ func TestRouterNotFound(t *testing.T) { w := performRequest(router, "GET", tr.route) assert.Equal(t, w.Code, tr.code) if w.Code != 404 { - assert.Equal(t, fmt.Sprint(w.Header().Get("Location")), tr.header) + assert.Equal(t, fmt.Sprint(w.Header().Get("Location")), tr.Location) } }