(t *testing.T)
| 317 | } |
| 318 | |
| 319 | func TestLoginSetsGitProtocolForProvidedHost(t *testing.T) { |
| 320 | // Given we are logged in |
| 321 | authCfg := newTestAuthConfig(t) |
| 322 | _, err := authCfg.Login("github.com", "test-user", "test-token", "ssh", false) |
| 323 | require.NoError(t, err) |
| 324 | |
| 325 | // When we get the host git protocol |
| 326 | hostProtocol, err := authCfg.cfg.Get([]string{hostsKey, "github.com", gitProtocolKey}) |
| 327 | require.NoError(t, err) |
| 328 | |
| 329 | // Then it returns the git protocol we provided on login |
| 330 | require.Equal(t, "ssh", hostProtocol) |
| 331 | } |
| 332 | |
| 333 | func TestLoginAddsHostIfNotAlreadyAdded(t *testing.T) { |
| 334 | // Given we are logged in |
nothing calls this directly
no test coverage detected