(t *testing.T)
| 997 | } |
| 998 | |
| 999 | func Test_Group_Use_NoBoundary(t *testing.T) { |
| 1000 | t.Parallel() |
| 1001 | |
| 1002 | app := New() |
| 1003 | grp := app.Group("/api") |
| 1004 | |
| 1005 | grp.Use("/foo", func(c Ctx) error { |
| 1006 | return c.SendStatus(StatusOK) |
| 1007 | }) |
| 1008 | |
| 1009 | resp, err := app.Test(httptest.NewRequest(MethodGet, "/api/foo/bar", http.NoBody)) |
| 1010 | require.NoError(t, err, "app.Test(req)") |
| 1011 | require.Equal(t, StatusOK, resp.StatusCode, "Status code") |
| 1012 | |
| 1013 | resp, err = app.Test(httptest.NewRequest(MethodGet, "/api/foobar", http.NoBody)) |
| 1014 | require.NoError(t, err, "app.Test(req)") |
| 1015 | require.Equal(t, StatusNotFound, resp.StatusCode, "Status code") |
| 1016 | } |
| 1017 | |
| 1018 | func Test_App_Use_StrictRouting(t *testing.T) { |
| 1019 | t.Parallel() |
nothing calls this directly
no test coverage detected