init
Some checks failed
CI / Check Style (push) Has been cancelled
CI / Run Clippy (push) Has been cancelled
CI / Run Tests (push) Has been cancelled

This commit is contained in:
2025-07-25 03:05:58 +02:00
commit 41afc170ba
86 changed files with 9924 additions and 0 deletions

3
tests/workers/mod.rs Normal file
View File

@@ -0,0 +1,3 @@
pub mod scan_library_worker;

View File

@@ -0,0 +1,20 @@
use loco_rs::{bgworker::BackgroundWorker, testing::prelude::*};
use music_metadata_manager::{
app::App,
workers::scan_library_worker::{Worker, WorkerArgs},
};
use serial_test::serial;
#[tokio::test]
#[serial]
async fn test_run_scan_library_worker_worker() {
let boot = boot_test::<App>().await.unwrap();
// Execute the worker ensuring that it operates in 'ForegroundBlocking' mode, which prevents the addition of your worker to the background
assert!(
Worker::perform_later(&boot.app_context, WorkerArgs { library_id: 1 })
.await
.is_ok()
);
// Include additional assert validations after the execution of the worker
}