Skip to content

Commit

Permalink
test: add test_delete_with_finder
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenesvk committed Dec 7, 2024
1 parent 3c8fa4f commit d2189d1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/macos/test_macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ fn test_delete_with_ns_file_manager() {
assert!(File::open(&path).is_err());
}

#[test]
#[serial]
fn test_delete_with_finder() {
init_logging();
let mut trash_ctx = TrashContext::default();
trash_ctx.set_delete_method(DeleteMethod::Finder);

let path = PathBuf::from(get_unique_name());
File::create_new(&path).unwrap();
assert!(path.exists());
trash_ctx.delete(&path).unwrap();
assert!(!path.exists());
}

#[test]
#[serial]
fn test_delete_binary_path_with_ns_file_manager_with_info() {
Expand Down

0 comments on commit d2189d1

Please sign in to comment.