Files
music-metadata-manager/tests/workers/scan_library_worker.rs
Gabriel Kaszewski 41afc170ba
Some checks failed
CI / Check Style (push) Has been cancelled
CI / Run Clippy (push) Has been cancelled
CI / Run Tests (push) Has been cancelled
init
2025-07-25 03:05:58 +02:00

21 lines
681 B
Rust

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
}