(t *testing.T, host string)
| 39 | } |
| 40 | |
| 41 | func newTestClient(t *testing.T, host string) (EventClient, *httpmock.Registry) { |
| 42 | reg := &httpmock.Registry{} |
| 43 | t.Cleanup(func() { reg.Verify(t) }) |
| 44 | return NewEventClient(&http.Client{Transport: reg}, host), reg |
| 45 | } |
| 46 | |
| 47 | func errorResponse(status int, message string) httpmock.Responder { |
| 48 | return httpmock.StatusJSONResponse(status, map[string]string{"message": message}) |
no test coverage detected