(t *testing.T, req *http.Request, code int, json string)
| 409 | } |
| 410 | |
| 411 | func doRequestAndExpect(t *testing.T, req *http.Request, code int, json string) { |
| 412 | res, err := client.Do(req) |
| 413 | assert.Nil(t, err) |
| 414 | buf := new(bytes.Buffer) |
| 415 | buf.ReadFrom(res.Body) |
| 416 | |
| 417 | assert.Equal(t, code, res.StatusCode) |
| 418 | assert.JSONEq(t, json, buf.String()) |
| 419 | } |
no test coverage detected
searching dependent graphs…