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

Function Test_getRepoVisibilityOptions

pkg/cmd/repo/create/create_test.go:1089–1111  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1087}
1088
1089func Test_getRepoVisibilityOptions(t *testing.T) {
1090 tests := []struct {
1091 name string
1092 owner string
1093 want []string
1094 }{
1095 {
1096 name: "user repo",
1097 owner: "",
1098 want: []string{"Public", "Private"},
1099 },
1100 {
1101 name: "org repo",
1102 owner: "fooOrg",
1103 want: []string{"Public", "Private", "Internal"},
1104 },
1105 }
1106 for _, tt := range tests {
1107 t.Run(tt.name, func(t *testing.T) {
1108 assert.Equal(t, tt.want, getRepoVisibilityOptions(tt.owner))
1109 })
1110 }
1111}

Callers

nothing calls this directly

Calls 3

getRepoVisibilityOptionsFunction · 0.85
EqualMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected