diff --git a/packages/tauri/src/watcher/handlers/project_file_change.rs b/packages/tauri/src/watcher/handlers/project_file_change.rs index 736c56661..8f1aa1356 100644 --- a/packages/tauri/src/watcher/handlers/project_file_change.rs +++ b/packages/tauri/src/watcher/handlers/project_file_change.rs @@ -285,7 +285,15 @@ mod test { deltas::Operation::Insert((4, "2".to_string())), ); assert_eq!( - std::fs::read_to_string(gb_repository.git_repository.path().join("gitbutler").join("session").join("wd").join("test.txt"))?, + std::fs::read_to_string( + gb_repository + .git_repository + .path() + .join("gitbutler") + .join("session") + .join("wd") + .join("test.txt") + )?, "test2" ); @@ -358,7 +366,15 @@ mod test { assert_eq!(deltas.len(), 1); assert_eq!(deltas[0].operations.len(), 0); assert_eq!( - std::fs::read_to_string(gb_repository.git_repository.path().join("gitbutler").join("session").join("wd").join("test.bin"))?, + std::fs::read_to_string( + gb_repository + .git_repository + .path() + .join("gitbutler") + .join("session") + .join("wd") + .join("test.bin") + )?, "" ); @@ -390,7 +406,15 @@ mod test { deltas::Operation::Insert((0, "test".to_string())), ); assert_eq!( - std::fs::read_to_string(gb_repository.git_repository.path().join("gitbutler").join("session").join("wd").join("test.txt"))?, + std::fs::read_to_string( + gb_repository + .git_repository + .path() + .join("gitbutler") + .join("session") + .join("wd") + .join("test.txt") + )?, "test" ); @@ -421,7 +445,15 @@ mod test { deltas::Operation::Insert((0, "test".to_string())), ); assert_eq!( - std::fs::read_to_string(gb_repository.git_repository.path().join("gitbutler").join("session").join("wd").join("test.txt"))?, + std::fs::read_to_string( + gb_repository + .git_repository + .path() + .join("gitbutler") + .join("session") + .join("wd") + .join("test.txt") + )?, "test" ); @@ -441,7 +473,15 @@ mod test { deltas::Operation::Insert((4, "2".to_string())), ); assert_eq!( - std::fs::read_to_string(gb_repository.git_repository.path().join("gitbutler").join("session").join("wd").join("test.txt"))?, + std::fs::read_to_string( + gb_repository + .git_repository + .path() + .join("gitbutler") + .join("session") + .join("wd") + .join("test.txt") + )?, "test2" ); @@ -472,7 +512,15 @@ mod test { deltas::Operation::Insert((0, "test".to_string())), ); assert_eq!( - std::fs::read_to_string(gb_repository.git_repository.path().join("gitbutler").join("session").join("wd").join("test.txt"))?, + std::fs::read_to_string( + gb_repository + .git_repository + .path() + .join("gitbutler") + .join("session") + .join("wd") + .join("test.txt") + )?, "test" );