Skip to content

Commit

Permalink
fix bug for go1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkerou committed Aug 14, 2018
1 parent 24cb8de commit 9f94b13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9f94b13

Please sign in to comment.