MCPcopy
hub / github.com/cli/cli / TestOwnerGitExtension

Function TestOwnerGitExtension

pkg/cmd/extension/extension_test.go:87–96  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

85}
86
87func TestOwnerGitExtension(t *testing.T) {
88 gc := &mockGitClient{}
89 gc.On("Config", "remote.origin.url").Return("git@github.com:owner/repo.git", nil).Once()
90 e := &Extension{
91 kind: GitKind,
92 gitClient: gc,
93 }
94
95 assert.Equal(t, "owner", e.Owner())
96}
97
98func TestOwnerCached(t *testing.T) {
99 e := &Extension{

Callers

nothing calls this directly

Calls 2

OwnerMethod · 0.95
EqualMethod · 0.80

Tested by

no test coverage detected