MCPcopy Create free account
hub / github.com/cli/cli / TestHelperCategory

Function TestHelperCategory

pkg/cmd/auth/shared/telemetry_test.go:103–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

101}
102
103func TestHelperCategory(t *testing.T) {
104 tests := []struct {
105 name string
106 helper gitcredentials.Helper
107 want string
108 }{
109 {name: "ours", helper: gitcredentials.Helper{Cmd: "!/path/to/gh auth git-credential"}, want: "ours"},
110 {name: "other", helper: gitcredentials.Helper{Cmd: "osxkeychain"}, want: "other"},
111 {name: "none", helper: gitcredentials.Helper{}, want: "none"},
112 }
113 for _, tt := range tests {
114 t.Run(tt.name, func(t *testing.T) {
115 assert.Equal(t, tt.want, helperCategory(tt.helper))
116 })
117 }
118}

Callers

nothing calls this directly

Calls 3

helperCategoryFunction · 0.85
EqualMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected