(t *testing.T)
| 315 | } |
| 316 | |
| 317 | func TestLoginSetsUserForProvidedHost(t *testing.T) { |
| 318 | // Given we are not logged in |
| 319 | authCfg := newTestAuthConfig(t) |
| 320 | |
| 321 | // When we login |
| 322 | _, err := authCfg.Login("github.com", "test-user", "test-token", "ssh", false) |
| 323 | |
| 324 | // Then it returns success and the user is set |
| 325 | require.NoError(t, err) |
| 326 | |
| 327 | user, err := authCfg.ActiveUser("github.com") |
| 328 | require.NoError(t, err) |
| 329 | require.Equal(t, "test-user", user) |
| 330 | } |
| 331 | |
| 332 | func TestLoginSetsGitProtocolForProvidedHost(t *testing.T) { |
| 333 | // Given we are logged in |
nothing calls this directly
no test coverage detected