(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func TestGitShimAllowsReadonlyAccess(t *testing.T) { |
| 133 | tempDir := initGitForPreCommit(t) |
| 134 | tempDir.MkdirAll(".quickhook", "pre-commit") |
| 135 | tempDir.WriteFile([]string{".quickhook", "pre-commit", "accesses-git"}, "#!/bin/sh \n git status") |
| 136 | |
| 137 | output, err := tempDir.ExecQuickhook("hook", "pre-commit") |
| 138 | assert.Nil(t, err) |
| 139 | assert.Empty(t, output) |
| 140 | } |
| 141 | |
| 142 | func TestGitShimDeniesOtherAccess(t *testing.T) { |
| 143 | tempDir := initGitForPreCommit(t) |
nothing calls this directly
no test coverage detected