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

Function TestHasEnvTokenWithoutAnyEnvToken

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

Source from the content-addressed store, hash-verified

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