feat(network): Support for adding tags to Sonarr

This commit is contained in:
2024-11-22 14:58:14 -07:00
parent ce701c1ab7
commit 57eced64c0
10 changed files with 127 additions and 20 deletions
+25 -1
View File
@@ -6,7 +6,7 @@ mod tests {
use crate::models::{
servarr_models::{
HostConfig, Indexer, Log, LogResponse, QualityProfile, QueueEvent, Release, RootFolder,
SecurityConfig,
SecurityConfig, Tag,
},
sonarr_models::{
BlocklistItem, BlocklistResponse, DownloadRecord, DownloadsResponse, Episode,
@@ -370,4 +370,28 @@ mod tests {
SonarrSerdeable::SecurityConfig(security_config)
);
}
#[test]
fn test_sonarr_serdeable_from_tag() {
let tag = Tag {
id: 1,
..Tag::default()
};
let sonarr_serdeable: SonarrSerdeable = tag.clone().into();
assert_eq!(sonarr_serdeable, SonarrSerdeable::Tag(tag));
}
#[test]
fn test_sonarr_serdeable_from_tags() {
let tags = vec![Tag {
id: 1,
..Tag::default()
}];
let sonarr_serdeable: SonarrSerdeable = tags.clone().into();
assert_eq!(sonarr_serdeable, SonarrSerdeable::Tags(tags));
}
}