(t *testing.T)
| 231 | } |
| 232 | |
| 233 | func TestPrompt_expiring_decline(t *testing.T) { |
| 234 | ios, _, _, _ := iostreams.Test() |
| 235 | f := GitCredentialFlow{ |
| 236 | IO: ios, |
| 237 | Prompter: &prompter.PrompterMock{ |
| 238 | SelectFunc: func(_, _ string, options []string) (int, error) { |
| 239 | return slices.Index(options, "Continue without it (you manage Git credentials yourself)"), nil |
| 240 | }, |
| 241 | }, |
| 242 | HelperConfig: &stubHelperConfig{helper: gitcredentials.Helper{Cmd: "osxkeychain"}}, |
| 243 | } |
| 244 | |
| 245 | err := f.Prompt("github.com", true) |
| 246 | if err != nil { |
| 247 | t.Fatalf("Prompt() error = %v", err) |
| 248 | } |
| 249 | if f.ShouldSetup() { |
| 250 | t.Error("ShouldSetup() = true, want false after declining to configure gh") |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | func TestPrompt_expiring_stop(t *testing.T) { |
| 255 | ios, _, _, _ := iostreams.Test() |
nothing calls this directly
no test coverage detected