(t *testing.T)
| 1072 | } |
| 1073 | |
| 1074 | func Test_Request_Patch(t *testing.T) { |
| 1075 | t.Parallel() |
| 1076 | |
| 1077 | app, ln, start := createHelperServer(t) |
| 1078 | |
| 1079 | app.Patch("/", func(c fiber.Ctx) error { |
| 1080 | return c.SendString(c.FormValue("foo")) |
| 1081 | }) |
| 1082 | |
| 1083 | go start() |
| 1084 | time.Sleep(100 * time.Millisecond) |
| 1085 | |
| 1086 | client := New().SetDial(ln) |
| 1087 | |
| 1088 | for range 5 { |
| 1089 | resp, err := AcquireRequest(). |
| 1090 | SetClient(client). |
| 1091 | SetFormData("foo", "bar"). |
| 1092 | Patch("http://example.com") |
| 1093 | |
| 1094 | require.NoError(t, err) |
| 1095 | require.Equal(t, fiber.StatusOK, resp.StatusCode()) |
| 1096 | require.Equal(t, "bar", resp.String()) |
| 1097 | |
| 1098 | resp.Close() |
| 1099 | } |
| 1100 | } |
| 1101 | |
| 1102 | func Test_Request_Query(t *testing.T) { |
| 1103 | t.Parallel() |
nothing calls this directly
no test coverage detected