(t *testing.T)
| 725 | } |
| 726 | |
| 727 | func Test_App_serverErrorHandler_Network_Error(t *testing.T) { |
| 728 | t.Parallel() |
| 729 | app := New() |
| 730 | c := app.AcquireCtx(&fasthttp.RequestCtx{}).(*DefaultCtx) //nolint:errcheck,forcetypeassert // not needed |
| 731 | |
| 732 | app.serverErrorHandler(c.fasthttp, &net.DNSError{ |
| 733 | Err: "test error", |
| 734 | Name: "test host", |
| 735 | IsTimeout: false, |
| 736 | }) |
| 737 | require.Equal(t, string(c.fasthttp.Response.Body()), utils.StatusMessage(StatusBadGateway)) |
| 738 | require.Equal(t, StatusBadGateway, c.fasthttp.Response.StatusCode()) |
| 739 | } |
| 740 | |
| 741 | func Test_App_serverErrorHandler_Unsupported_Method_Error(t *testing.T) { |
| 742 | t.Parallel() |
nothing calls this directly
no test coverage detected