| 1780 | } |
| 1781 | |
| 1782 | func 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 | |
| 1795 | func TestClientIsIgnoredReturnsTrueForIgnoredPath(t *testing.T) { |
| 1796 | // Given a repository that ignores the requested path |