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

Function TestHasNoActiveToken

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

Source from the content-addressed store, hash-verified

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…