MCPcopy
hub / github.com/cli/cli / TestNew_APIURL_dotcomFallback

Function TestNew_APIURL_dotcomFallback

internal/codespaces/api/api_test.go:210–222  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

208}
209
210func TestNew_APIURL_dotcomFallback(t *testing.T) {
211 t.Setenv("GITHUB_API_URL", "")
212 f := &cmdutil.Factory{
213 Config: func() (gh.Config, error) {
214 return nil, errors.New("Failed to load")
215 },
216 }
217 api := New(f)
218
219 if api.githubAPI != "https://api.github.com" {
220 t.Fatalf("expected https://api.github.com, got %s", api.githubAPI)
221 }
222}
223
224func TestNew_ServerURL_dotcomConfig(t *testing.T) {
225 t.Setenv("GITHUB_SERVER_URL", "")

Callers

nothing calls this directly

Calls 1

NewFunction · 0.70

Tested by

no test coverage detected