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