(t *testing.T)
| 330 | } |
| 331 | |
| 332 | func TestLoginSetsGitProtocolForProvidedHost(t *testing.T) { |
| 333 | // Given we are logged in |
| 334 | authCfg := newTestAuthConfig(t) |
| 335 | _, err := authCfg.Login("github.com", "test-user", "test-token", "ssh", false) |
| 336 | require.NoError(t, err) |
| 337 | |
| 338 | // When we get the host git protocol |
| 339 | hostProtocol, err := authCfg.cfg.Get([]string{hostsKey, "github.com", gitProtocolKey}) |
| 340 | require.NoError(t, err) |
| 341 | |
| 342 | // Then it returns the git protocol we provided on login |
| 343 | require.Equal(t, "ssh", hostProtocol) |
| 344 | } |
| 345 | |
| 346 | func TestLoginAddsHostIfNotAlreadyAdded(t *testing.T) { |
| 347 | // Given we are logged in |
nothing calls this directly
no test coverage detected