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

Function TestSetup_configureExisting

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

Source from the content-addressed store, hash-verified

31}
32
33func TestSetup_configureExisting(t *testing.T) {
34 cs, restoreRun := run.Stub()
35 defer restoreRun(t)
36 cs.Register(`git credential reject`, 0, "")
37 cs.Register(`git credential approve`, 0, "")
38
39 f := GitCredentialFlow{
40 helper: gitcredentials.Helper{Cmd: "osxkeychain"},
41 Updater: &gitcredentials.Updater{
42 GitClient: &git.Client{GitPath: "some/path/git"},
43 },
44 }
45
46 if _, err := f.Setup("example.com", "monalisa", "PASSWD", false); err != nil {
47 t.Errorf("Setup() error = %v", err)
48 }
49}
50
51func TestSetup_refreshableExternalHelper_declineGh(t *testing.T) {
52 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