MCPcopy Index your code
hub / github.com/cli/cli / TestSelectNameWithCodespaceName

Function TestSelectNameWithCodespaceName

pkg/cmd/codespace/codespace_selector_test.go:33–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestSelectNameWithCodespaceName(t *testing.T) {
34 wantName := "mock-codespace"
35
36 cs := &CodespaceSelector{codespaceName: wantName}
37
38 name, err := cs.SelectName(context.Background())
39
40 if name != wantName {
41 t.Errorf("incorrect name: want %s, got %s", wantName, name)
42 }
43
44 if err != nil {
45 t.Errorf("unexpected error: %v", err)
46 }
47}
48
49func TestFetchCodespaces(t *testing.T) {
50 var (

Callers

nothing calls this directly

Calls 2

SelectNameMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected