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

Function TestHasNoActiveToken

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

Source from the content-addressed store, hash-verified

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