domain: add Storage & Sources entities (StorageVolume, LibraryPath, IngestSession, Quota)
This commit is contained in:
13
crates/domain/tests/entities/library_path.rs
Normal file
13
crates/domain/tests/entities/library_path.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user