diff --git a/gitbutler-app/tests/watcher/handler/calculate_delta_handler.rs b/gitbutler-app/tests/watcher/handler/calculate_delta_handler.rs index 1edd76423..3614c3f51 100644 --- a/gitbutler-app/tests/watcher/handler/calculate_delta_handler.rs +++ b/gitbutler-app/tests/watcher/handler/calculate_delta_handler.rs @@ -9,7 +9,7 @@ use gitbutler_app::watcher::handlers::calculate_deltas_handler::Handler; use gitbutler_core::{ deltas::{self, operations::Operation}, reader, sessions, - virtual_branches::{self, branch}, + virtual_branches::{self, branch, VirtualBranchesHandle}, }; use once_cell::sync::Lazy; @@ -637,8 +637,12 @@ fn should_persist_branches_targets_state_between_sessions() -> Result<()> { } = &suite.new_case_with_files(HashMap::from([(PathBuf::from("test.txt"), "hello world")])); let listener = Handler::from_path(suite.local_app_data()); - let branch_writer = branch::Writer::new(gb_repository, project.gb_dir())?; - let target_writer = virtual_branches::target::Writer::new(gb_repository, project.gb_dir())?; + let branch_writer = + branch::Writer::new(gb_repository, VirtualBranchesHandle::new(&project.gb_dir()))?; + let target_writer = virtual_branches::target::Writer::new( + gb_repository, + VirtualBranchesHandle::new(&project.gb_dir()), + )?; let default_target = new_test_target(); target_writer.write_default(&default_target)?; let mut vbranch0 = new_test_branch(); @@ -690,8 +694,12 @@ fn should_restore_branches_targets_state_from_head_session() -> Result<()> { } = &suite.new_case_with_files(HashMap::from([(PathBuf::from("test.txt"), "hello world")])); let listener = Handler::from_path(suite.local_app_data()); - let branch_writer = branch::Writer::new(gb_repository, project.gb_dir())?; - let target_writer = virtual_branches::target::Writer::new(gb_repository, project.gb_dir())?; + let branch_writer = + branch::Writer::new(gb_repository, VirtualBranchesHandle::new(&project.gb_dir()))?; + let target_writer = virtual_branches::target::Writer::new( + gb_repository, + VirtualBranchesHandle::new(&project.gb_dir()), + )?; let default_target = new_test_target(); target_writer.write_default(&default_target)?; let mut vbranch0 = new_test_branch();