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

Function TestHasNoActiveToken

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

Source from the content-addressed store, hash-verified

77}
78
79func TestHasNoActiveToken(t *testing.T) {
80 // Given there are no users logged in for a host
81 authCfg := newTestAuthConfig(t)
82
83 // When we check if any host has an active token
84 hasActiveToken := authCfg.HasActiveToken("github.com")
85
86 // Then there is no active token
87 require.False(t, hasActiveToken, "expected there to be no active token")
88}
89
90func TestTokenStoredInConfig(t *testing.T) {
91 // 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