mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-23 10:02:10 +08:00
fix bug for go1.6
This commit is contained in:
parent
24cb8de52d
commit
9f94b1379d
@ -1016,7 +1016,9 @@ func TestContextRenderRedirectAll(t *testing.T) {
|
|||||||
assert.Panics(t, func() { c.Redirect(299, "/resource") })
|
assert.Panics(t, func() { c.Redirect(299, "/resource") })
|
||||||
assert.Panics(t, func() { c.Redirect(309, "/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.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) {
|
func TestContextNegotiationWithJSON(t *testing.T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user