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

Function TestTokenForUserNotFoundErrors

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

Source from the content-addressed store, hash-verified

657}
658
659func TestTokenForUserNotFoundErrors(t *testing.T) {
660 // Given a user has not logged in
661 authCfg := newTestAuthConfig(t)
662
663 // When we get the token
664 _, _, err := authCfg.TokenForUser("github.com", "test-user-1")
665
666 // Then it returns an error
667 require.EqualError(t, err, "no token found for 'test-user-1'")
668}
669
670func requireKeyWithValue(t *testing.T, cfg *ghConfig.Config, keys []string, value string) {
671 t.Helper()

Callers

nothing calls this directly

Calls 2

newTestAuthConfigFunction · 0.85
TokenForUserMethod · 0.65

Tested by

no test coverage detected