(t *testing.T)
| 139 | } |
| 140 | |
| 141 | func TestIsPinnedGitExtensionUnpinned(t *testing.T) { |
| 142 | tempDir := t.TempDir() |
| 143 | extPath := filepath.Join(tempDir, "extensions", "gh-local", "gh-local") |
| 144 | assert.NoError(t, stubExtension(extPath)) |
| 145 | |
| 146 | gc := &mockGitClient{} |
| 147 | gc.On("CommandOutput", []string{"rev-parse", "HEAD"}).Return("abcd1234", nil) |
| 148 | e := &Extension{ |
| 149 | kind: GitKind, |
| 150 | gitClient: gc, |
| 151 | path: extPath, |
| 152 | } |
| 153 | |
| 154 | assert.False(t, e.IsPinned()) |
| 155 | gc.AssertExpectations(t) |
| 156 | } |
| 157 | |
| 158 | func TestIsPinnedGitExtensionPinned(t *testing.T) { |
| 159 | tempDir := t.TempDir() |
nothing calls this directly
no test coverage detected