(t *testing.T)
| 699 | } |
| 700 | |
| 701 | func Test_App_serverErrorHandler_Internal_Error(t *testing.T) { |
| 702 | t.Parallel() |
| 703 | app := New() |
| 704 | msg := "test err" |
| 705 | c := app.AcquireCtx(&fasthttp.RequestCtx{}).(*DefaultCtx) //nolint:errcheck,forcetypeassert // not needed |
| 706 | |
| 707 | app.serverErrorHandler(c.fasthttp, errors.New(msg)) |
| 708 | require.Equal(t, string(c.fasthttp.Response.Body()), msg) |
| 709 | require.Equal(t, StatusBadRequest, c.fasthttp.Response.StatusCode()) |
| 710 | } |
| 711 | |
| 712 | func Test_App_serverErrorHandler_TypedNilOpError(t *testing.T) { |
| 713 | t.Parallel() |
nothing calls this directly
no test coverage detected