feat(network): Support to fetch all Sonarr history events
This commit is contained in:
@@ -9,7 +9,8 @@ mod tests {
|
||||
},
|
||||
sonarr_models::{
|
||||
BlocklistItem, BlocklistResponse, DownloadRecord, DownloadsResponse, Episode,
|
||||
IndexerSettings, Series, SeriesStatus, SeriesType, SonarrSerdeable, SystemStatus,
|
||||
IndexerSettings, Series, SeriesStatus, SeriesType, SonarrHistoryItem, SonarrHistoryWrapper,
|
||||
SonarrSerdeable, SystemStatus,
|
||||
},
|
||||
Serdeable,
|
||||
};
|
||||
@@ -167,6 +168,22 @@ mod tests {
|
||||
assert_eq!(sonarr_serdeable, SonarrSerdeable::Series(series));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_sonarr_serdeable_from_sonarr_history_wrapper() {
|
||||
let history_wrapper = SonarrHistoryWrapper {
|
||||
records: vec![SonarrHistoryItem {
|
||||
id: 1,
|
||||
..SonarrHistoryItem::default()
|
||||
}],
|
||||
};
|
||||
let sonarr_serdeable: SonarrSerdeable = history_wrapper.clone().into();
|
||||
|
||||
assert_eq!(
|
||||
sonarr_serdeable,
|
||||
SonarrSerdeable::SonarrHistoryWrapper(history_wrapper)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_sonarr_serdeable_from_system_status() {
|
||||
let system_status = SystemStatus {
|
||||
|
||||
Reference in New Issue
Block a user