(t testing.TB, response *TestResponse, expectedStatus int)
| 1238 | } |
| 1239 | |
| 1240 | func 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 | |
| 1248 | func NewSlowResponseRecorder(responseDelay time.Duration, responseRecorder *httptest.ResponseRecorder) *SlowResponseRecorder { |
| 1249 |
no outgoing calls