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

Function TestClientRemoteURLReportsMissingGitExecutable

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

Source from the content-addressed store, hash-verified

1780}
1781
1782func TestClientRemoteURLReportsMissingGitExecutable(t *testing.T) {
1783 // Given Git cannot be resolved
1784 t.Setenv("PATH", "")
1785 client := Client{}
1786
1787 // When a remote URL is requested
1788 remoteURL, err := client.RemoteURL(t.Context(), "origin")
1789
1790 // Then the resolution failure is returned
1791 require.Error(t, err)
1792 assert.Empty(t, remoteURL)
1793}
1794
1795func TestClientIsIgnoredReturnsTrueForIgnoredPath(t *testing.T) {
1796 // Given a repository that ignores the requested path

Callers

nothing calls this directly

Calls 3

RemoteURLMethod · 0.95
EmptyMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected