(t *testing.T)
| 302 | } |
| 303 | |
| 304 | func TestLoginSetsUserForProvidedHost(t *testing.T) { |
| 305 | // Given we are not logged in |
| 306 | authCfg := newTestAuthConfig(t) |
| 307 | |
| 308 | // When we login |
| 309 | _, err := authCfg.Login("github.com", "test-user", "test-token", "ssh", false) |
| 310 | |
| 311 | // Then it returns success and the user is set |
| 312 | require.NoError(t, err) |
| 313 | |
| 314 | user, err := authCfg.ActiveUser("github.com") |
| 315 | require.NoError(t, err) |
| 316 | require.Equal(t, "test-user", user) |
| 317 | } |
| 318 | |
| 319 | func TestLoginSetsGitProtocolForProvidedHost(t *testing.T) { |
| 320 | // Given we are logged in |
nothing calls this directly
no test coverage detected