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

Function TestRejectExisting

pkg/cmd/auth/shared/gitcredentials/updater_test.go:88–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86}
87
88func TestRejectExisting(t *testing.T) {
89 cs, restoreRun := run.Stub()
90 defer restoreRun(t)
91 // Only reject is registered: approve must not be called, otherwise the stub panics.
92 cs.Register(`git credential reject`, 0, "")
93
94 u := &gitcredentials.Updater{
95 GitClient: &git.Client{GitPath: "some/path/git"},
96 }
97 require.NoError(t, u.RejectExisting("github.com"))
98}

Callers

nothing calls this directly

Calls 3

RejectExistingMethod · 0.95
StubFunction · 0.92
RegisterMethod · 0.45

Tested by

no test coverage detected