go test -run Test_Ctx_Cookie_DefaultPath
(t *testing.T)
| 1607 | |
| 1608 | // go test -run Test_Ctx_Cookie_DefaultPath |
| 1609 | func Test_Ctx_Cookie_DefaultPath(t *testing.T) { |
| 1610 | t.Parallel() |
| 1611 | app := New() |
| 1612 | c := app.AcquireCtx(&fasthttp.RequestCtx{}) |
| 1613 | |
| 1614 | ck := &Cookie{ |
| 1615 | Name: "p", |
| 1616 | Value: "v", |
| 1617 | // Path intentionally empty to verify defaulting |
| 1618 | } |
| 1619 | |
| 1620 | c.Res().Cookie(ck) |
| 1621 | require.Equal( |
| 1622 | t, |
| 1623 | "p=v; path=/; SameSite=Lax", |
| 1624 | c.Res().Get(HeaderSetCookie), |
| 1625 | ) |
| 1626 | } |
| 1627 | |
| 1628 | // go test -run Test_Ctx_Cookie_MaxAgeOnly |
| 1629 | func Test_Ctx_Cookie_MaxAgeOnly(t *testing.T) { |
nothing calls this directly
no test coverage detected