From 25da032f02c9121995607d0b6993c3139449df08 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Thu, 17 Sep 2026 15:36:27 -0600 Subject: [PATCH] test(lidarr): give the download record fixture distinct album and artist ids The shared download record held id, album id, and artist id all equal to 1, so reading the wrong one of the three could not fail any test that uses the fixture. Move artist id to 3 and id to 9, keeping album id at 1 so the fully populated album view still shows its track as downloading, and update the three handler assertions that named the old id. --- .../lidarr_handlers/downloads/downloads_handler_tests.rs | 6 +++--- src/network/lidarr_network/lidarr_network_test_utils.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/handlers/lidarr_handlers/downloads/downloads_handler_tests.rs b/src/handlers/lidarr_handlers/downloads/downloads_handler_tests.rs index 9c65988e..b36ab646 100644 --- a/src/handlers/lidarr_handlers/downloads/downloads_handler_tests.rs +++ b/src/handlers/lidarr_handlers/downloads/downloads_handler_tests.rs @@ -141,7 +141,7 @@ mod tests { #[case( ActiveLidarrBlock::Downloads, ActiveLidarrBlock::DeleteDownloadPrompt, - LidarrEvent::DeleteDownload(1) + LidarrEvent::DeleteDownload(9) )] #[case( ActiveLidarrBlock::Downloads, @@ -338,7 +338,7 @@ mod tests { #[case( ActiveLidarrBlock::Downloads, ActiveLidarrBlock::DeleteDownloadPrompt, - LidarrEvent::DeleteDownload(1) + LidarrEvent::DeleteDownload(9) )] #[case( ActiveLidarrBlock::Downloads, @@ -423,7 +423,7 @@ mod tests { ) .extract_download_id(); - assert_eq!(download_id, 1); + assert_eq!(download_id, 9); } #[test] diff --git a/src/network/lidarr_network/lidarr_network_test_utils.rs b/src/network/lidarr_network/lidarr_network_test_utils.rs index d50a5ed5..a841f9b9 100644 --- a/src/network/lidarr_network/lidarr_network_test_utils.rs +++ b/src/network/lidarr_network/lidarr_network_test_utils.rs @@ -184,9 +184,9 @@ pub mod test_utils { DownloadRecord { title: "Test download title".to_owned(), status: DownloadStatus::Downloading, - id: 1, + id: 9, album_id: Some(Number::from(1i64)), - artist_id: Some(Number::from(1i64)), + artist_id: Some(Number::from(3i64)), size: 3543348019f64, sizeleft: 1771674009f64, output_path: Some(HorizontallyScrollableText::from("/nfs/music/alex/album")),