MCPcopy Create free account
hub / github.com/cli/cli / TestHasNoActiveToken

Function TestHasNoActiveToken

internal/config/auth_config_test.go:69–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

67}
68
69func TestHasNoActiveToken(t *testing.T) {
70 // Given there are no users logged in for a host
71 authCfg := newTestAuthConfig(t)
72
73 // When we check if any host has an active token
74 hasActiveToken := authCfg.HasActiveToken("github.com")
75
76 // Then there is no active token
77 require.False(t, hasActiveToken, "expected there to be no active token")
78}
79
80func TestTokenStoredInConfig(t *testing.T) {
81 // Given the user has logged in insecurely

Callers

nothing calls this directly

Calls 2

newTestAuthConfigFunction · 0.85
HasActiveTokenMethod · 0.65

Tested by

no test coverage detected