MCPcopy
hub / github.com/cli/cli / hasActiveToken

Function hasActiveToken

pkg/cmd/auth/logout/logout_test.go:564–571  ·  view source on GitHub ↗
(hostname string, expectedToken string)

Source from the content-addressed store, hash-verified

562}
563
564func hasActiveToken(hostname string, expectedToken string) tokenAssertion {
565 return func(t *testing.T, cfg gh.Config) {
566 t.Helper()
567
568 token, _ := cfg.Authentication().ActiveToken(hostname)
569 require.Equal(t, expectedToken, token)
570 }
571}

Callers 2

Test_logoutRun_ttyFunction · 0.85
Test_logoutRun_nonttyFunction · 0.85

Calls 4

EqualMethod · 0.80
HelperMethod · 0.65
ActiveTokenMethod · 0.65
AuthenticationMethod · 0.65

Tested by

no test coverage detected