Skip to content

Commit 260e81a

Browse files
committed
Use simpler function for asserting workspace is open.
1 parent a5962b7 commit 260e81a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

crates/gitbutler-branch-actions/tests/virtual_branches/workspace_migration.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use gitbutler_branch::VirtualBranchesHandle;
2-
use gitbutler_branch_actions::{update_workspace_commit, verify_branch};
3-
use gitbutler_operating_modes::{INTEGRATION_BRANCH_REF, WORKSPACE_BRANCH_REF};
2+
use gitbutler_branch_actions::update_workspace_commit;
3+
use gitbutler_operating_modes::{
4+
assure_open_workspace_mode, INTEGRATION_BRANCH_REF, WORKSPACE_BRANCH_REF,
5+
};
46

57
/// Tests that "verify branch" won't complain if we are on the old integration
68
/// branch, and that `update_workspace_commit` will put us back on the a branch
@@ -11,8 +13,6 @@ fn works_on_integration_branch() -> anyhow::Result<()> {
1113
"for-workspace-migration.sh",
1214
"workspace-migration",
1315
)?;
14-
let mut guard = ctx.project().exclusive_worktree_access();
15-
let perm = guard.write_permission();
1616

1717
// Check that we are on the old `gitbutler/integration` branch.
1818
assert_eq!(
@@ -21,7 +21,7 @@ fn works_on_integration_branch() -> anyhow::Result<()> {
2121
);
2222

2323
// Should not throw verification error until migration is complete.
24-
let result = verify_branch(&ctx, perm);
24+
let result = assure_open_workspace_mode(&ctx);
2525
assert!(result.is_ok());
2626

2727
// Updating workspace commit should put us on the workspace branch.

0 commit comments

Comments
 (0)