diff --git a/context_test.go b/context_test.go index a109479e..7edf85a4 100644 --- a/context_test.go +++ b/context_test.go @@ -602,13 +602,13 @@ func TestContextPostFormMultipart(t *testing.T) { func TestContextSetCookie(t *testing.T) { c, _ := CreateTestContext(httptest.NewRecorder()) - c.SetCookie("user", "gin", 1, "/", "localhost", "Lax", true, true) + c.SetCookie("user", "gin", 1, "/", "localhost", http.SameSiteLaxMode, true, true) assert.Equal(t, "user=gin; Path=/; Domain=localhost; Max-Age=1; SameSite=Lax; HttpOnly; Secure", c.Writer.Header().Get("Set-Cookie")) } func TestContextSetCookiePathEmpty(t *testing.T) { c, _ := CreateTestContext(httptest.NewRecorder()) - c.SetCookie("user", "gin", 1, "", "localhost", "Lax", true, true) + c.SetCookie("user", "gin", 1, "", "localhost", http.SameSiteLaxMode, true, true) assert.Equal(t, "user=gin; Path=/; Domain=localhost; Max-Age=1; SameSite=Lax; HttpOnly; Secure", c.Writer.Header().Get("Set-Cookie")) }