(t *testing.T)
| 1978 | } |
| 1979 | |
| 1980 | func Test_NextCustom_SkipNonUseRoutesSkipsFallback(t *testing.T) { |
| 1981 | t.Parallel() |
| 1982 | |
| 1983 | app := newCustomApp() |
| 1984 | app.Get("/foo", func(c Ctx) error { return c.SendStatus(StatusOK) }) |
| 1985 | app.startupProcess() |
| 1986 | |
| 1987 | fctx := &fasthttp.RequestCtx{} |
| 1988 | fctx.Request.Header.SetMethod(MethodPost) |
| 1989 | fctx.Request.SetRequestURI("/foo") |
| 1990 | |
| 1991 | ctx := app.AcquireCtx(fctx) |
| 1992 | ctx.setSkipNonUseRoutes(true) |
| 1993 | defer app.ReleaseCtx(ctx) |
| 1994 | |
| 1995 | matched, err := app.nextCustom(ctx) |
| 1996 | require.False(t, matched) |
| 1997 | require.NoError(t, err) |
| 1998 | require.Empty(t, ctx.Response().Header.Peek(HeaderAllow)) |
| 1999 | } |
| 2000 | |
| 2001 | func Test_NextCustom_NotFound(t *testing.T) { |
| 2002 | t.Parallel() |
nothing calls this directly
no test coverage detected