+
+ #[test]
+ fn test_check_site_visibility_valid() {
+ assert!(check_site_visibility_valid(true, true, &None, &None).is_err());
+ assert!(check_site_visibility_valid(true, false, &None, &Some(true)).is_err());
+ assert!(check_site_visibility_valid(false, true, &Some(true), &None).is_err());
+ assert!(check_site_visibility_valid(false, false, &Some(true), &Some(true)).is_err());
+ assert!(check_site_visibility_valid(true, false, &None, &None).is_ok());
+ assert!(check_site_visibility_valid(false, true, &None, &None).is_ok());
+ assert!(check_site_visibility_valid(false, false, &Some(true), &None).is_ok());
+ assert!(check_site_visibility_valid(false, false, &None, &Some(true)).is_ok());
+ }