(t *testing.T, withAuth bool, fn roundTripFunc)
| 19 | } |
| 20 | |
| 21 | func newTestClient(t *testing.T, withAuth bool, fn roundTripFunc) *Client { |
| 22 | t.Helper() |
| 23 | |
| 24 | client := &Client{ |
| 25 | http: &http.Client{Transport: fn}, |
| 26 | } |
| 27 | if withAuth { |
| 28 | apiKey := "test-api-key" |
| 29 | client.Config = &config.Config{ |
| 30 | CliID: "test-cli-id", |
| 31 | APIKey: &apiKey, |
| 32 | } |
| 33 | } |
| 34 | return client |
| 35 | } |
| 36 | |
| 37 | func response(status int, body string) *http.Response { |
| 38 | return &http.Response{ |
no outgoing calls
no test coverage detected