(t *testing.T)
| 1006 | } |
| 1007 | |
| 1008 | func TestContextSetCookie(t *testing.T) { |
| 1009 | c, _ := CreateTestContext(httptest.NewRecorder()) |
| 1010 | c.SetSameSite(http.SameSiteLaxMode) |
| 1011 | c.SetCookie("user", "gin", 1, "/", "localhost", true, true) |
| 1012 | assert.Equal(t, "user=gin; Path=/; Domain=localhost; Max-Age=1; HttpOnly; Secure; SameSite=Lax", c.Writer.Header().Get("Set-Cookie")) |
| 1013 | } |
| 1014 | |
| 1015 | func TestContextSetCookiePathEmpty(t *testing.T) { |
| 1016 | c, _ := CreateTestContext(httptest.NewRecorder()) |
nothing calls this directly
no test coverage detected