feat(network): Added support for fetching Sonarr queued events

This commit is contained in:
2024-11-19 12:01:07 -07:00
parent 9ceb55a314
commit 6b64b5ecc4
15 changed files with 160 additions and 53 deletions
+13 -1
View File
@@ -4,7 +4,7 @@ mod tests {
use serde_json::json;
use crate::models::{
servarr_models::{HostConfig, Indexer, SecurityConfig},
servarr_models::{HostConfig, Indexer, QueueEvent, SecurityConfig},
sonarr_models::{
BlocklistItem, BlocklistResponse, DownloadRecord, DownloadsResponse, Episode,
IndexerSettings, Log, LogResponse, QualityProfile, Series, SeriesStatus, SeriesType,
@@ -231,6 +231,18 @@ mod tests {
);
}
#[test]
fn test_sonarr_serdeable_from_queue_events() {
let queue_events = vec![QueueEvent {
trigger: "test".to_owned(),
..QueueEvent::default()
}];
let sonarr_serdeable: SonarrSerdeable = queue_events.clone().into();
assert_eq!(sonarr_serdeable, SonarrSerdeable::QueueEvents(queue_events));
}
#[test]
fn test_sonarr_serdeable_from_security_config() {
let security_config = SecurityConfig {