diff options
| author | jakka <jakka@jakka.su> | 2025-10-23 16:36:58 +0300 |
|---|---|---|
| committer | jakka <jakka@jakka.su> | 2025-10-23 16:36:58 +0300 |
| commit | e3497005259d85325bef00989b5d426d176efc46 (patch) | |
| tree | bfb1ef87b3e0afbf776559d06918dce923c5d492 /tests | |
| parent | 73d2abeab17a63815476f76c29c3b9dd70820ccc (diff) | |
tests change - files are deleted from all local files
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/async.rs | 23 |
1 files changed, 3 insertions, 20 deletions
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(); |
