(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func TestHasActiveToken(t *testing.T) { |
| 67 | // Given the user has logged in for a host |
| 68 | authCfg := newTestAuthConfig(t) |
| 69 | _, err := authCfg.Login("github.com", "test-user", "test-token", "", false) |
| 70 | require.NoError(t, err) |
| 71 | |
| 72 | // When we check if that host has an active token |
| 73 | hasActiveToken := authCfg.HasActiveToken("github.com") |
| 74 | |
| 75 | // Then there is an active token |
| 76 | require.True(t, hasActiveToken, "expected there to be an active token") |
| 77 | } |
| 78 | |
| 79 | func TestHasNoActiveToken(t *testing.T) { |
| 80 | // Given there are no users logged in for a host |
nothing calls this directly
no test coverage detected