Skip to content

Commit ede1597

Browse files
committed
fix(test): update snapshot_spec to expect --git-dir/--work-tree
1 parent f9232d4 commit ede1597

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/unit/snapshot_spec.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ describe('snapshot.restore', function()
6666
assert.equal(2, #system_calls)
6767

6868
-- First call: read-tree
69-
assert.same({ 'git', '-C', '/mock/gitdir', 'read-tree', 'abc123' }, system_calls[1].cmd)
69+
assert.same({ 'git', '--git-dir', '/mock/gitdir', '--work-tree', '/mock/project/root', 'read-tree', 'abc123' }, system_calls[1].cmd)
7070

7171
-- Second call: checkout-index
72-
assert.same({ 'git', '-C', '/mock/gitdir', 'checkout-index', '-a', '-f' }, system_calls[2].cmd)
72+
assert.same({ 'git', '--git-dir', '/mock/gitdir', '--work-tree', '/mock/project/root', 'checkout-index', '-a', '-f' }, system_calls[2].cmd)
7373

7474
-- Notification
7575
assert.is_truthy(vim.g._last_notify)

0 commit comments

Comments
 (0)