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

Function Test_Client_Cookie_With_Server

client/client_test.go:1494–1513  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1492}
1493
1494func Test_Client_Cookie_With_Server(t *testing.T) {
1495 t.Parallel()
1496
1497 handler := func(c fiber.Ctx) error {
1498 return c.SendString(
1499 c.Cookies("k1") + c.Cookies("k2") + c.Cookies("k3") + c.Cookies("k4"),
1500 )
1501 }
1502
1503 wrapAgent := func(c *Client) {
1504 c.SetCookie("k1", "v1").
1505 SetCookies(map[string]string{
1506 "k2": "v2",
1507 "k3": "v3",
1508 "k4": "v4",
1509 }).DelCookies("k4")
1510 }
1511
1512 testClient(t, handler, wrapAgent, "v1v2v3")
1513}
1514
1515func Test_Client_CookieJar(t *testing.T) {
1516 handler := func(c fiber.Ctx) error {

Callers

nothing calls this directly

Calls 6

testClientFunction · 0.85
SendStringMethod · 0.65
CookiesMethod · 0.65
DelCookiesMethod · 0.45
SetCookiesMethod · 0.45
SetCookieMethod · 0.45

Tested by

no test coverage detected