AssertCode asserts that the HTTP return code matches an expected value
(t *testing.T, resp *httptest.ResponseRecorder, code int)
| 32 | |
| 33 | // AssertCode asserts that the HTTP return code matches an expected value |
| 34 | func AssertCode(t *testing.T, resp *httptest.ResponseRecorder, code int) { |
| 35 | if resp.Code != code { |
| 36 | t.Errorf("Expected code %d, got %d", code, resp.Code) |
| 37 | } |
| 38 | } |
no outgoing calls
no test coverage detected