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

Function TestDefaultHostNotLoggedIn

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

Source from the content-addressed store, hash-verified

211}
212
213func TestDefaultHostNotLoggedIn(t *testing.T) {
214 // Given we are not logged in
215 authCfg := newTestAuthConfig(t)
216
217 // When we get the DefaultHost
218 defaultHost, source := authCfg.DefaultHost()
219
220 // Then the returned host is always github.com
221 require.Equal(t, "github.com", defaultHost)
222 require.Equal(t, "default", source)
223}
224
225func TestDefaultHostLoggedInToOnlyOneHost(t *testing.T) {
226 // Given we are logged into one host (not github.com to differentiate from the fallback)

Callers

nothing calls this directly

Calls 3

newTestAuthConfigFunction · 0.85
EqualMethod · 0.80
DefaultHostMethod · 0.65

Tested by

no test coverage detected