(code int, json []byte)
| 117 | } |
| 118 | |
| 119 | func newResponseJSON(code int, json []byte) (*http.Response, error) { |
| 120 | header := http.Header{} |
| 121 | header.Set("Content-Type", runtime.ContentTypeJSON) |
| 122 | body := io.NopCloser(bytes.NewReader(json)) |
| 123 | return &http.Response{StatusCode: code, Header: header, Body: body}, nil |
| 124 | } |
| 125 | |
| 126 | func newTestClient(t *testing.T) *Client { |
| 127 | t.Helper() |
no test coverage detected
searching dependent graphs…