MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / assertStatusCode

Function assertStatusCode

lib/httpmiddlewares/bearertokenauth_test.go:258–263  ·  view source on GitHub ↗
(t *testing.T, rr *httptest.ResponseRecorder, expectedCode int)

Source from the content-addressed store, hash-verified

256}
257
258func assertStatusCode(t *testing.T, rr *httptest.ResponseRecorder, expectedCode int) {
259 t.Helper()
260 if rr.Code != expectedCode {
261 t.Errorf("expected status code %d, got %d", expectedCode, rr.Code)
262 }
263}
264
265func assertResponseBody(t *testing.T, rr *httptest.ResponseRecorder, expectedBody string) {
266 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected