(t *testing.T)
| 1932 | } |
| 1933 | |
| 1934 | func Test_Next_SkipNonUseRoutesSkipsFallback(t *testing.T) { |
| 1935 | t.Parallel() |
| 1936 | |
| 1937 | app := New() |
| 1938 | app.Get("/foo", func(c Ctx) error { return c.SendStatus(StatusOK) }) |
| 1939 | app.startupProcess() |
| 1940 | |
| 1941 | fctx := &fasthttp.RequestCtx{} |
| 1942 | fctx.Request.Header.SetMethod(MethodPost) |
| 1943 | fctx.Request.SetRequestURI("/foo") |
| 1944 | |
| 1945 | ctx := app.AcquireCtx(fctx).(*DefaultCtx) //nolint:errcheck,forcetypeassert // default app returns DefaultCtx |
| 1946 | ctx.setSkipNonUseRoutes(true) |
| 1947 | defer app.ReleaseCtx(ctx) |
| 1948 | |
| 1949 | matched, err := app.next(ctx) |
| 1950 | require.False(t, matched) |
| 1951 | require.NoError(t, err) |
| 1952 | require.Empty(t, ctx.Response().Header.Peek(HeaderAllow)) |
| 1953 | } |
| 1954 | |
| 1955 | func Test_NextCustom_MethodNotAllowed(t *testing.T) { |
| 1956 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…