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

Function TestParsePushDefaultReportsUnknownValue

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

Source from the content-addressed store, hash-verified

1706}
1707
1708func TestParsePushDefaultReportsUnknownValue(t *testing.T) {
1709 // Given an unsupported push.default value
1710 value := "invalid"
1711
1712 // When it is parsed
1713 pushDefault, err := ParsePushDefault(value)
1714
1715 // Then the unknown value is identified
1716 require.EqualError(t, err, "unknown push.default value: invalid")
1717 assert.Empty(t, pushDefault)
1718}
1719
1720func createCommand(t *testing.T, exitStatus int, stdout, stderr string) *exec.Cmd {
1721 t.Helper()

Callers

nothing calls this directly

Calls 2

ParsePushDefaultFunction · 0.85
EmptyMethod · 0.80

Tested by

no test coverage detected