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

Function TestDefaultHostNotLoggedIn

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

Source from the content-addressed store, hash-verified

224}
225
226func TestDefaultHostNotLoggedIn(t *testing.T) {
227 // Given we are not logged in
228 authCfg := newTestAuthConfig(t)
229
230 // When we get the DefaultHost
231 defaultHost, source := authCfg.DefaultHost()
232
233 // Then the returned host is always github.com
234 require.Equal(t, "github.com", defaultHost)
235 require.Equal(t, "default", source)
236}
237
238func TestDefaultHostLoggedInToOnlyOneHost(t *testing.T) {
239 // 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