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

Function TestClientReadBranchConfigReturnsEmptyConfigWhenUnset

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

Source from the content-addressed store, hash-verified

522}
523
524func TestClientReadBranchConfigReturnsEmptyConfigWhenUnset(t *testing.T) {
525 // Given a repository without branch configuration
526 repo := newTestRepo(t)
527
528 // When the branch configuration is read
529 branchConfig, err := repo.client.ReadBranchConfig(t.Context(), "trunk")
530
531 // Then an empty configuration is returned without error
532 require.NoError(t, err)
533 assert.Equal(t, BranchConfig{}, branchConfig)
534}
535
536func TestClientReadBranchConfigReturnsConfiguredValues(t *testing.T) {
537 // Given all supported branch configuration values set through the client

Callers

nothing calls this directly

Calls 3

newTestRepoFunction · 0.85
EqualMethod · 0.80
ReadBranchConfigMethod · 0.65

Tested by

no test coverage detected