Files
k-photos/crates/domain/tests/entities/library_path.rs

14 lines
452 B
Rust

use domain::entities::{LibraryPath, OwnershipPolicy};
use domain::value_objects::SystemId;
#[test]
fn user_owned_path() {
let vol = SystemId::new();
let owner = SystemId::new();
let lp = LibraryPath::new_user_owned(vol, "/photos", owner, true);
assert_eq!(lp.ownership_policy, OwnershipPolicy::UserOwned);
assert_eq!(lp.designated_owner_id, Some(owner));
assert!(lp.is_ingest_destination);
assert_eq!(lp.volume_id, vol);
}