(t *testing.T)
| 297 | } |
| 298 | |
| 299 | func Test_Route_Match_Root(t *testing.T) { |
| 300 | t.Parallel() |
| 301 | |
| 302 | app := New() |
| 303 | |
| 304 | app.Get("/", func(c Ctx) error { |
| 305 | return c.SendString("root") |
| 306 | }) |
| 307 | |
| 308 | resp, err := app.Test(httptest.NewRequest(MethodGet, "/", http.NoBody)) |
| 309 | require.NoError(t, err, "app.Test(req)") |
| 310 | require.Equal(t, 200, resp.StatusCode, "Status code") |
| 311 | |
| 312 | body, err := io.ReadAll(resp.Body) |
| 313 | require.NoError(t, err, "app.Test(req)") |
| 314 | require.Equal(t, "root", app.toString(body)) |
| 315 | } |
| 316 | |
| 317 | func Test_Route_Match_Parser(t *testing.T) { |
| 318 | t.Parallel() |
nothing calls this directly
no test coverage detected