MCPcopy Index your code
hub / github.com/cli/cli / TestSetUserSpecificKey

Function TestSetUserSpecificKey

internal/config/config_test.go:163–174  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

161}
162
163func TestSetUserSpecificKey(t *testing.T) {
164 c := newTestConfig()
165 host := "github.com"
166 user := "test-user"
167 c.cfg.Set([]string{hostsKey, host, userKey}, user)
168
169 key := "host-level-key"
170 val := "host-level-value"
171 c.Set(host, key, val)
172 requireKeyWithValue(t, c.cfg, []string{hostsKey, host, key}, val)
173 requireKeyWithValue(t, c.cfg, []string{hostsKey, host, usersKey, user, key}, val)
174}
175
176func TestSetUserSpecificKeyNoUserPresent(t *testing.T) {
177 c := newTestConfig()

Callers

nothing calls this directly

Calls 3

newTestConfigFunction · 0.85
requireKeyWithValueFunction · 0.70
SetMethod · 0.65

Tested by

no test coverage detected