From 58604c2d80da071f550ac5bd9f8adeec571d3e39 Mon Sep 17 00:00:00 2001 From: thinkerou Date: Mon, 20 Jan 2020 10:36:47 +0800 Subject: [PATCH] Update context_test.go --- context_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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")) }