feat(network): Support for fetching all Sonarr root folders

This commit is contained in:
2024-11-21 16:37:23 -07:00
parent f4c647342b
commit 16538a3158
18 changed files with 138 additions and 45 deletions
+14 -1
View File
@@ -5,7 +5,8 @@ mod tests {
use crate::models::{
servarr_models::{
HostConfig, Indexer, Log, LogResponse, QualityProfile, QueueEvent, Release, SecurityConfig,
HostConfig, Indexer, Log, LogResponse, QualityProfile, QueueEvent, Release, RootFolder,
SecurityConfig,
},
sonarr_models::{
BlocklistItem, BlocklistResponse, DownloadRecord, DownloadsResponse, Episode,
@@ -343,6 +344,18 @@ mod tests {
assert_eq!(sonarr_serdeable, SonarrSerdeable::Releases(releases));
}
#[test]
fn test_sonarr_serdeable_from_root_folders() {
let root_folders = vec![RootFolder {
id: 1,
..RootFolder::default()
}];
let sonarr_serdeable: SonarrSerdeable = root_folders.clone().into();
assert_eq!(sonarr_serdeable, SonarrSerdeable::RootFolders(root_folders));
}
#[test]
fn test_sonarr_serdeable_from_security_config() {
let security_config = SecurityConfig {