style: cargo fmt --all

This commit is contained in:
2026-05-31 05:31:42 +02:00
parent 4b31a0f74b
commit c2ebca0da0
138 changed files with 2422 additions and 1164 deletions

View File

@@ -6,14 +6,26 @@ use domain::value_objects::{DateTimeStamp, SystemId};
#[test]
fn not_expired_when_no_expiry() {
let scope = ShareScope::new(ScopeType::Link, ShareableType::Album, SystemId::new(), SystemId::new());
let scope = ShareScope::new(
ScopeType::Link,
ShareableType::Album,
SystemId::new(),
SystemId::new(),
);
assert!(!scope.is_expired());
}
#[test]
fn expired_when_past() {
let mut scope = ShareScope::new(ScopeType::Link, ShareableType::Album, SystemId::new(), SystemId::new());
scope.expires_at = Some(DateTimeStamp::from_datetime(Utc::now() - Duration::hours(1)));
let mut scope = ShareScope::new(
ScopeType::Link,
ShareableType::Album,
SystemId::new(),
SystemId::new(),
);
scope.expires_at = Some(DateTimeStamp::from_datetime(
Utc::now() - Duration::hours(1),
));
assert!(scope.is_expired());
}