MCPcopy
hub / github.com/cli/cli / TestHasEnvTokenWithoutAnyEnvToken

Function TestHasEnvTokenWithoutAnyEnvToken

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

Source from the content-addressed store, hash-verified

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