MCPcopy
hub / github.com/gofiber/fiber / testErrorResponse

Function testErrorResponse

app_test.go:81–90  ·  view source on GitHub ↗
(t *testing.T, err error, resp *http.Response, expectedBodyError string)

Source from the content-addressed store, hash-verified

79}
80
81func testErrorResponse(t *testing.T, err error, resp *http.Response, expectedBodyError string) {
82 t.Helper()
83
84 require.NoError(t, err, "app.Test(req)")
85 require.Equal(t, 500, resp.StatusCode, "Status code")
86
87 body, err := io.ReadAll(resp.Body)
88 require.NoError(t, err)
89 require.Equal(t, expectedBodyError, string(body), "Response body")
90}
91
92func Test_App_Test_Goroutine_Leak_Compare(t *testing.T) {
93 // Not parallel: this test relies on runtime.NumGoroutine() deltas,

Calls

no outgoing calls

Tested by

no test coverage detected