Tests for HasUncommittedChanges
(t *testing.T)
| 204 | // Tests for HasUncommittedChanges |
| 205 | |
| 206 | func TestHasUncommittedChanges_Clean(t *testing.T) { |
| 207 | tmpDir := t.TempDir() |
| 208 | setupGitRepo(t, tmpDir) |
| 209 | |
| 210 | createFile(t, tmpDir, "test.txt", "content") |
| 211 | gitAdd(t, tmpDir, "test.txt") |
| 212 | gitCommit(t, tmpDir, "Initial commit") |
| 213 | |
| 214 | hasChanges, err := HasUncommittedChanges(tmpDir) |
| 215 | |
| 216 | require.NoError(t, err) |
| 217 | assert.False(t, hasChanges) |
| 218 | } |
| 219 | |
| 220 | func TestHasUncommittedChanges_UntrackedFile(t *testing.T) { |
| 221 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected