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

Function testStatus200

app_test.go:71–79  ·  view source on GitHub ↗
(t *testing.T, app *App, url, method string)

Source from the content-addressed store, hash-verified

69}
70
71func testStatus200(t *testing.T, app *App, url, method string) {
72 t.Helper()
73
74 req := httptest.NewRequest(method, url, http.NoBody)
75
76 resp, err := app.Test(req)
77 require.NoError(t, err, "app.Test(req)")
78 require.Equal(t, 200, resp.StatusCode, "Status code")
79}
80
81func testErrorResponse(t *testing.T, err error, resp *http.Response, expectedBodyError string) {
82 t.Helper()

Callers 5

Test_App_MethodsFunction · 0.85
Test_App_GroupFunction · 0.85
Test_App_RouteChainFunction · 0.85
Test_App_RouteFunction · 0.85
Test_App_Deep_GroupFunction · 0.85

Calls 1

TestMethod · 0.80

Tested by

no test coverage detected