MCPcopy
hub / github.com/cli/cli / TestNew_ServerURL_dotcomFallback

Function TestNew_ServerURL_dotcomFallback

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

Source from the content-addressed store, hash-verified

293}
294
295func TestNew_ServerURL_dotcomFallback(t *testing.T) {
296 t.Setenv("GITHUB_SERVER_URL", "")
297 f := &cmdutil.Factory{
298 Config: func() (gh.Config, error) {
299 return nil, errors.New("Failed to load")
300 },
301 }
302 api := New(f)
303
304 if api.githubServer != "https://github.com" {
305 t.Fatalf("expected https://github.com, got %s", api.githubServer)
306 }
307}
308
309func TestCreateCodespaces(t *testing.T) {
310 svr := createFakeCreateEndpointServer(t, http.StatusCreated)

Callers

nothing calls this directly

Calls 1

NewFunction · 0.70

Tested by

no test coverage detected