MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / AssertStatus

Function AssertStatus

rest/utilities_testing.go:1240–1246  ·  view source on GitHub ↗
(t testing.TB, response *TestResponse, expectedStatus int)

Source from the content-addressed store, hash-verified

1238}
1239
1240func AssertStatus(t testing.TB, response *TestResponse, expectedStatus int) bool {
1241 return assert.Equalf(t, expectedStatus, response.Code,
1242 "Response status %d %q (expected %d %q)\nfor %s <%s> : %s",
1243 response.Code, http.StatusText(response.Code),
1244 expectedStatus, http.StatusText(expectedStatus),
1245 response.Req.Method, response.Req.URL, response.Body)
1246}
1247
1248func NewSlowResponseRecorder(responseDelay time.Duration, responseRecorder *httptest.ResponseRecorder) *SlowResponseRecorder {
1249

Calls

no outgoing calls