MCPcopy
hub / github.com/cli/cli / TestSetup_configureExisting

Function TestSetup_configureExisting

pkg/cmd/auth/shared/git_credential_test.go:11–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestSetup_configureExisting(t *testing.T) {
12 cs, restoreRun := run.Stub()
13 defer restoreRun(t)
14 cs.Register(`git credential reject`, 0, "")
15 cs.Register(`git credential approve`, 0, "")
16
17 f := GitCredentialFlow{
18 helper: gitcredentials.Helper{Cmd: "osxkeychain"},
19 Updater: &gitcredentials.Updater{
20 GitClient: &git.Client{GitPath: "some/path/git"},
21 },
22 }
23
24 if err := f.Setup("example.com", "monalisa", "PASSWD"); err != nil {
25 t.Errorf("Setup() error = %v", err)
26 }
27}
28
29func TestGitCredentialsSetup_setOurs_GH(t *testing.T) {
30 cs, restoreRun := run.Stub()

Callers

nothing calls this directly

Calls 4

SetupMethod · 0.95
StubFunction · 0.92
ErrorfMethod · 0.65
RegisterMethod · 0.45

Tested by

no test coverage detected