refactor: move DateRange validation to value object, add delete/cleanup
Some checks failed
CI / Check / Test (push) Failing after 40s

This commit is contained in:
2026-06-03 00:58:07 +02:00
parent 3a66f89609
commit fc086de7f7
8 changed files with 46 additions and 33 deletions

View File

@@ -32,10 +32,11 @@ fn make_row(title: &str, rating: u8, watched_at: &str) -> WrapUpMovieRow {
}
fn year_2024_range() -> DateRange {
DateRange {
start: NaiveDate::from_ymd_opt(2024, 1, 1).unwrap(),
end: NaiveDate::from_ymd_opt(2025, 1, 1).unwrap(),
}
DateRange::new(
NaiveDate::from_ymd_opt(2024, 1, 1).unwrap(),
NaiveDate::from_ymd_opt(2025, 1, 1).unwrap(),
)
.unwrap()
}
#[tokio::test]