Skip to content

Commit

Permalink
rust: fix l10n web tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Feb 26, 2024
1 parent 36072de commit 0beff2d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions rust/agama-dbus-server/src/l10n/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ mod tests {
let state = build_state();
let response = super::locales(axum::extract::State(state)).await;
let default = LocaleCode::default();
let found = response.locales.iter().find(|l| l.code == default);
let found = response.iter().find(|l| l.code == default);
assert!(found.is_some());
}

Expand All @@ -193,18 +193,15 @@ mod tests {
let state = build_state();
let response = super::keymaps(axum::extract::State(state)).await;
let english: KeymapId = "us".parse().unwrap();
let found = response.keymaps.iter().find(|k| k.id == english);
let found = response.iter().find(|k| k.id == english);
assert!(found.is_some());
}

#[test]
async fn test_timezones() {
let state = build_state();
let response = super::timezones(axum::extract::State(state)).await;
let found = response
.timezones
.iter()
.find(|t| t.code == "Atlantic/Canary");
let found = response.iter().find(|t| t.code == "Atlantic/Canary");
assert!(found.is_some());
}
}

0 comments on commit 0beff2d

Please sign in to comment.