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

Function TestHasEnvTokenWithoutAnyEnvToken

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

Source from the content-addressed store, hash-verified

149}
150
151func TestHasEnvTokenWithoutAnyEnvToken(t *testing.T) {
152 // Given we have no env set
153 authCfg := newTestAuthConfig(t)
154
155 // When we check if it has an env token
156 hasEnvToken := authCfg.HasEnvToken()
157
158 // Then it returns false
159 require.False(t, hasEnvToken, "expected not to have env token")
160}
161
162func TestHasEnvTokenWithEnvToken(t *testing.T) {
163 // Given we have an env token set

Callers

nothing calls this directly

Calls 2

newTestAuthConfigFunction · 0.85
HasEnvTokenMethod · 0.65

Tested by

no test coverage detected