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

Function TestHasEnvTokenWithoutAnyEnvToken

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

Source from the content-addressed store, hash-verified

134}
135
136func TestHasEnvTokenWithoutAnyEnvToken(t *testing.T) {
137 // Given we have no env set
138 authCfg := newTestAuthConfig(t)
139
140 // When we check if it has an env token
141 hasEnvToken := authCfg.HasEnvToken()
142
143 // Then it returns false
144 require.False(t, hasEnvToken, "expected not to have env token")
145}
146
147func TestHasEnvTokenWithEnvToken(t *testing.T) {
148 // 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