(t *testing.T)
| 1513 | } |
| 1514 | |
| 1515 | func Test_Client_CookieJar(t *testing.T) { |
| 1516 | handler := func(c fiber.Ctx) error { |
| 1517 | return c.SendString( |
| 1518 | c.Cookies("k1") + c.Cookies("k2") + c.Cookies("k3"), |
| 1519 | ) |
| 1520 | } |
| 1521 | |
| 1522 | jar := AcquireCookieJar() |
| 1523 | defer ReleaseCookieJar(jar) |
| 1524 | |
| 1525 | jar.SetKeyValue("example.com", "k1", "v1") |
| 1526 | jar.SetKeyValue("example.com", "k2", "v2") |
| 1527 | jar.SetKeyValue("example", "k3", "v3") |
| 1528 | |
| 1529 | wrapAgent := func(c *Client) { |
| 1530 | c.SetCookieJar(jar) |
| 1531 | } |
| 1532 | testClient(t, handler, wrapAgent, "v1v2") |
| 1533 | } |
| 1534 | |
| 1535 | func Test_Client_CookieJar_Response(t *testing.T) { |
| 1536 | t.Parallel() |
nothing calls this directly
no test coverage detected