(t *testing.T)
| 1999 | } |
| 2000 | |
| 2001 | func Test_NextCustom_NotFound(t *testing.T) { |
| 2002 | t.Parallel() |
| 2003 | app := newCustomApp() |
| 2004 | app.RebuildTree() |
| 2005 | |
| 2006 | fctx := &fasthttp.RequestCtx{} |
| 2007 | fctx.Request.Header.SetMethod(MethodGet) |
| 2008 | fctx.Request.SetRequestURI("/not-exist") |
| 2009 | |
| 2010 | ctx := app.AcquireCtx(fctx) |
| 2011 | defer app.ReleaseCtx(ctx) |
| 2012 | |
| 2013 | matched, err := app.nextCustom(ctx) |
| 2014 | require.False(t, matched) |
| 2015 | var e *Error |
| 2016 | require.ErrorAs(t, err, &e) |
| 2017 | require.Equal(t, StatusNotFound, e.Code) |
| 2018 | } |
| 2019 | |
| 2020 | func Test_RequestHandler_CustomCtx_NotImplemented(t *testing.T) { |
| 2021 | t.Parallel() |
nothing calls this directly
no test coverage detected