test: give the shared IndexerSettings fixture distinct field values

minimum_age and retention were both 1, so transposing them in any code that reads both rendered identically and no test could tell the difference. id was also 1, which cannot distinguish a correctly threaded value from a hardcode.

Verified by transposing minimum_age and retention in the Sonarr indexer settings UI: that mutation survived the full suite before this change and is now caught by the settings snapshot.
This commit is contained in:
Dark-Alex-17 committed 2026-09-09 16:31:05 -06:00
1 parent cef1ad13af
commit d08f7d4b4e
3 files changed
+8 -8

No files matched your search

+3 -3
View File
@@ -12,9 +12,9 @@ pub fn diskspace() -> DiskSpace {
pub fn indexer_settings() -> IndexerSettings {
IndexerSettings {
id: 1,
minimum_age: 1,
retention: 1,
id: 7,
minimum_age: 13,
retention: 21,
maximum_size: 12345,
rss_sync_interval: 60,
}
@@ -42,10 +42,10 @@ mod tests {
#[tokio::test]
async fn test_handle_edit_all_indexer_settings_event() {
let indexer_settings_json = json!({
"id": 1,
"minimumAge": 1,
"id": 7,
"minimumAge": 13,
"maximumSize": 12345,
"retention": 1,
"retention": 21,
"rssSyncInterval": 60
});
let (mock, app, _server) = MockServarrApi::put()
@@ -21,10 +21,10 @@ expression: output
│ │
│ │
│ ╭────────────────────────────────╮ │
│ Minimum Age (minutes) ▴▾: │1 │ │
│ Minimum Age (minutes) ▴▾: │13 │ │
│ ╰────────────────────────────────╯ │
│ ╭────────────────────────────────╮ │
│ Retention (days) ▴▾: │1 │ │
│ Retention (days) ▴▾: │21 │ │
│ ╰────────────────────────────────╯ │
│ ╭────────────────────────────────╮ │
│ Maximum Size (MB) ▴▾: │12345 │ │