MCPcopy
hub / github.com/gofiber/fiber / Test_Ctx_Cookie_PartitionedSecure

Function Test_Ctx_Cookie_PartitionedSecure

ctx_test.go:1566–1580  ·  view source on GitHub ↗

go test -run Test_Ctx_Cookie_PartitionedSecure

(t *testing.T)

Source from the content-addressed store, hash-verified

1564
1565// go test -run Test_Ctx_Cookie_PartitionedSecure
1566func Test_Ctx_Cookie_PartitionedSecure(t *testing.T) {
1567 t.Parallel()
1568 app := New()
1569 c := app.AcquireCtx(&fasthttp.RequestCtx{})
1570
1571 ck := &Cookie{
1572 Name: "ps",
1573 Value: "v",
1574 Secure: true,
1575 SameSite: CookieSameSiteNoneMode,
1576 Partitioned: true,
1577 }
1578 c.Res().Cookie(ck)
1579 require.Equal(t, "ps=v; path=/; secure; SameSite=None; Partitioned", c.Res().Get(HeaderSetCookie))
1580}
1581
1582// go test -run Test_Ctx_Cookie_Invalid
1583func Test_Ctx_Cookie_Invalid(t *testing.T) {

Callers

nothing calls this directly

Calls 5

AcquireCtxMethod · 0.80
NewFunction · 0.70
CookieMethod · 0.65
ResMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected