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.
This commit is contained in:
Miguel Palhas
2026-08-25 01:11:08 +01:00
parent f773489fd7
commit c6cfdff2c9
+7 -2
View File
@@ -255,7 +255,7 @@ mod tests {
} }
#[tokio::test] #[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 (_dir, base) = application().await;
let settings: serde_json::Value = reqwest::get(format!("{base}/api/settings/subtitles")) let settings: serde_json::Value = reqwest::get(format!("{base}/api/settings/subtitles"))
.await .await
@@ -272,7 +272,12 @@ mod tests {
serde_json::json!(["opensubtitles", "podnapisi"]) serde_json::json!(["opensubtitles", "podnapisi"])
); );
assert!(settings["translation_engine"].is_null()); 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] #[tokio::test]