(t *testing.T)
| 1014 | } |
| 1015 | |
| 1016 | func Test_Request_Options(t *testing.T) { |
| 1017 | t.Parallel() |
| 1018 | |
| 1019 | app, ln, start := createHelperServer(t) |
| 1020 | |
| 1021 | app.Options("/", func(c fiber.Ctx) error { |
| 1022 | return c.Status(fiber.StatusOK). |
| 1023 | SendString("options") |
| 1024 | }) |
| 1025 | |
| 1026 | go start() |
| 1027 | time.Sleep(100 * time.Millisecond) |
| 1028 | |
| 1029 | client := New().SetDial(ln) |
| 1030 | |
| 1031 | for range 5 { |
| 1032 | resp, err := AcquireRequest(). |
| 1033 | SetClient(client). |
| 1034 | Options("http://example.com") |
| 1035 | |
| 1036 | require.NoError(t, err) |
| 1037 | require.Equal(t, fiber.StatusOK, resp.StatusCode()) |
| 1038 | require.Equal(t, "options", resp.String()) |
| 1039 | |
| 1040 | resp.Close() |
| 1041 | } |
| 1042 | } |
| 1043 | |
| 1044 | func Test_Request_Send(t *testing.T) { |
| 1045 | t.Parallel() |
nothing calls this directly
no test coverage detected