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

Function TestClientConfigReturnsConfiguredValue

git/client_test.go:321–332  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

319}
320
321func TestClientConfigReturnsConfiguredValue(t *testing.T) {
322 // Given a repository with a configured credential helper
323 repo := newTestRepo(t)
324 repo.run(t, "config", "credential.helper", "test")
325
326 // When the configuration is read
327 value, err := repo.client.Config(t.Context(), "credential.helper")
328
329 // Then the configured value is returned
330 require.NoError(t, err)
331 assert.Equal(t, "test", value)
332}
333
334func TestClientConfigReportsUnknownKey(t *testing.T) {
335 // Given a repository without a credential helper

Callers

nothing calls this directly

Calls 4

newTestRepoFunction · 0.85
EqualMethod · 0.80
ConfigMethod · 0.65
runMethod · 0.45

Tested by

no test coverage detected