(t *testing.T)
| 186 | } |
| 187 | |
| 188 | func TestFetcher_DefaultOptions(t *testing.T) { |
| 189 | apiHost := testAPIHostResolver{baseURL: "https://api.github.com"} |
| 190 | fetcher := NewFetcher(apiHost, FetcherOptions{}) |
| 191 | |
| 192 | // Verify default API host is set |
| 193 | apiURL, err := fetcher.apiHost.BaseRESTURL(context.Background()) |
| 194 | require.NoError(t, err) |
| 195 | assert.Equal(t, "https://api.github.com", apiURL.String()) |
| 196 | |
| 197 | // Verify default HTTP client is set with timeout |
| 198 | assert.NotNil(t, fetcher.client) |
| 199 | assert.Equal(t, DefaultFetchTimeout, fetcher.client.Timeout) |
| 200 | } |
| 201 | |
| 202 | func TestFetcher_CustomHTTPClient(t *testing.T) { |
| 203 | customClient := &http.Client{Timeout: 5 * time.Second} |
nothing calls this directly
no test coverage detected