(t *testing.T)
| 211 | } |
| 212 | |
| 213 | func TestFetcher_CustomAPIHost(t *testing.T) { |
| 214 | apiHost := testAPIHostResolver{baseURL: "https://api.github.enterprise.com"} |
| 215 | fetcher := NewFetcher(apiHost, FetcherOptions{}) |
| 216 | |
| 217 | apiURL, err := fetcher.apiHost.BaseRESTURL(context.Background()) |
| 218 | require.NoError(t, err) |
| 219 | assert.Equal(t, "https://api.github.enterprise.com", apiURL.String()) |
| 220 | } |
| 221 | |
| 222 | func TestFetcher_ContextCancellation(t *testing.T) { |
| 223 | server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { |
nothing calls this directly
no test coverage detected