From e3497005259d85325bef00989b5d426d176efc46 Mon Sep 17 00:00:00 2001 From: jakka Date: Thu, 23 Oct 2025 16:36:58 +0300 Subject: tests change - files are deleted from all local files --- tests/async.rs | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'tests/async.rs') diff --git a/tests/async.rs b/tests/async.rs index 8bdf501..2ba993b 100644 --- a/tests/async.rs +++ b/tests/async.rs @@ -50,9 +50,9 @@ async fn add_and_delete_file() { panic!(); } - let trash_service = Some(FileDomain::FileServiceKey( + let all_local_files = Some(FileDomain::FileServiceKey( client - .get_service_name("all my files") + .get_service_name("all local files") .await .unwrap() .service_key, @@ -63,24 +63,7 @@ async fn add_and_delete_file() { .await .unwrap(); client - .delete_files(HydrusFile::Hash(file.hash.clone()), trash_service, None) - .await - .unwrap(); - - client - .clear_file_deletion_records(HydrusFile::Hash(file.hash)) - .await - .unwrap(); - let file = client.add_file_via_file(path.clone()).await.unwrap(); - if client.add_file_via_file(path).await.unwrap().status != AddFileStatus::AlreadyInDatabase { - panic!(); - } - client - .delete_files(HydrusFile::Hash(file.hash.clone()), None, None) - .await - .unwrap(); - client - .delete_files(HydrusFile::Hash(file.hash.clone()), None, None) + .delete_files(HydrusFile::Hash(file.hash.clone()), all_local_files, None) .await .unwrap(); -- cgit v1.3.1