From c6cfdff2c906ef7db213e002496f4fecdd72302d Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Tue, 25 Aug 2026 01:11:08 +0100 Subject: [PATCH] test(arr): read available_engines from the build Second test that assumed the empty default feature set. It asserted available_engines was literally [], which --all-features makes false. --- crates/arr-api/src/subtitle_settings.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/arr-api/src/subtitle_settings.rs b/crates/arr-api/src/subtitle_settings.rs index bb15fc3..5b6a28b 100644 --- a/crates/arr-api/src/subtitle_settings.rs +++ b/crates/arr-api/src/subtitle_settings.rs @@ -255,7 +255,7 @@ mod tests { } #[tokio::test] - async fn the_seeded_row_reads_back_with_no_engines_compiled() { + async fn the_seeded_row_reads_back_with_the_engines_this_build_compiled() { let (_dir, base) = application().await; let settings: serde_json::Value = reqwest::get(format!("{base}/api/settings/subtitles")) .await @@ -272,7 +272,12 @@ mod tests { serde_json::json!(["opensubtitles", "podnapisi"]) ); assert!(settings["translation_engine"].is_null()); - assert_eq!(settings["available_engines"], serde_json::json!([])); + // `available_engines` is a fact about the build, not about the seed + // row, so it tracks the `translate-*` features rather than a literal. + assert_eq!( + settings["available_engines"], + serde_json::json!(arr_subs::compiled_engines()) + ); } #[tokio::test]