From 9f94b1379d006903de408439e52e7eb910bf3b1d Mon Sep 17 00:00:00 2001 From: thinkerou Date: Tue, 14 Aug 2018 09:28:05 +0800 Subject: [PATCH] fix bug for go1.6 --- context_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/context_test.go b/context_test.go index b426bc93..77e3cb73 100644 --- a/context_test.go +++ b/context_test.go @@ -1016,7 +1016,9 @@ func TestContextRenderRedirectAll(t *testing.T) { assert.Panics(t, func() { c.Redirect(299, "/resource") }) assert.Panics(t, func() { c.Redirect(309, "/resource") }) assert.NotPanics(t, func() { c.Redirect(http.StatusMultipleChoices, "/resource") }) - assert.NotPanics(t, func() { c.Redirect(http.StatusPermanentRedirect, "/resource") }) + // todo(thinkerou): go1.6 not support StatusPermanentRedirect(308) + // when we upgrade go version we can use http.StatusPermanentRedirect + assert.NotPanics(t, func() { c.Redirect(308, "/resource") }) } func TestContextNegotiationWithJSON(t *testing.T) {