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

Function Test_Client_QueryParam_With_Server

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

Source from the content-addressed store, hash-verified

1779}
1780
1781func Test_Client_QueryParam_With_Server(t *testing.T) {
1782 handler := func(c fiber.Ctx) error {
1783 _, _ = c.WriteString(c.Query("k1")) //nolint:errcheck // It is fine to ignore the error here
1784 _, _ = c.WriteString(c.Query("k2")) //nolint:errcheck // It is fine to ignore the error here
1785
1786 return nil
1787 }
1788
1789 wrapAgent := func(c *Client) {
1790 c.SetParam("k1", "v1").
1791 AddParam("k2", "v2")
1792 }
1793
1794 testClient(t, handler, wrapAgent, "v1v2")
1795}
1796
1797func Test_Client_PathParam(t *testing.T) {
1798 t.Parallel()

Callers

nothing calls this directly

Calls 5

testClientFunction · 0.85
WriteStringMethod · 0.65
QueryMethod · 0.65
AddParamMethod · 0.45
SetParamMethod · 0.45

Tested by

no test coverage detected