feat(network): Added network support for fetching host and security configs from Sonarr

This commit is contained in:
2024-11-18 20:49:07 -07:00
parent f094cf5ad3
commit a012945df2
17 changed files with 328 additions and 205 deletions
+34
View File
@@ -0,0 +1,34 @@
#[cfg(test)]
mod tests {
use pretty_assertions::assert_str_eq;
use crate::models::servarr_models::{
AuthenticationMethod, AuthenticationRequired, CertificateValidation,
};
#[test]
fn test_authentication_method_display() {
assert_str_eq!(AuthenticationMethod::Basic.to_string(), "basic");
assert_str_eq!(AuthenticationMethod::Forms.to_string(), "forms");
assert_str_eq!(AuthenticationMethod::None.to_string(), "none");
}
#[test]
fn test_authentication_required_display() {
assert_str_eq!(AuthenticationRequired::Enabled.to_string(), "enabled");
assert_str_eq!(
AuthenticationRequired::DisabledForLocalAddresses.to_string(),
"disabledForLocalAddresses"
);
}
#[test]
fn test_certificate_validation_display() {
assert_str_eq!(CertificateValidation::Enabled.to_string(), "enabled");
assert_str_eq!(
CertificateValidation::DisabledForLocalAddresses.to_string(),
"disabledForLocalAddresses"
);
assert_str_eq!(CertificateValidation::Disabled.to_string(), "disabled");
}
}