| 1848 | } |
| 1849 | |
| 1850 | func TestClientIsIgnoredReportsMissingGitExecutable(t *testing.T) { |
| 1851 | // Given Git cannot be resolved |
| 1852 | t.Setenv("PATH", "") |
| 1853 | client := Client{} |
| 1854 | |
| 1855 | // When a path is checked |
| 1856 | ignored, err := client.IsIgnored(t.Context(), ".github/skills") |
| 1857 | |
| 1858 | // Then the resolution failure is returned |
| 1859 | require.Error(t, err) |
| 1860 | assert.False(t, ignored, "a missing Git executable must not report the path as ignored") |
| 1861 | } |
| 1862 | |
| 1863 | func TestShortSHA(t *testing.T) { |
| 1864 | tests := []struct { |