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:
3 files changed
+8
-8
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user