(t *testing.T)
| 156 | } |
| 157 | |
| 158 | func TestIsPinnedGitExtensionPinned(t *testing.T) { |
| 159 | tempDir := t.TempDir() |
| 160 | extPath := filepath.Join(tempDir, "extensions", "gh-local", "gh-local") |
| 161 | assert.NoError(t, stubPinnedExtension(extPath, "abcd1234")) |
| 162 | |
| 163 | gc := &mockGitClient{} |
| 164 | gc.On("CommandOutput", []string{"rev-parse", "HEAD"}).Return("abcd1234", nil) |
| 165 | e := &Extension{ |
| 166 | kind: GitKind, |
| 167 | gitClient: gc, |
| 168 | path: extPath, |
| 169 | } |
| 170 | |
| 171 | assert.True(t, e.IsPinned()) |
| 172 | gc.AssertExpectations(t) |
| 173 | } |
| 174 | |
| 175 | func TestIsPinnedLocalExtension(t *testing.T) { |
| 176 | tempDir := t.TempDir() |
nothing calls this directly
no test coverage detected