test-helpers out of production, decompose get_user_profile_html, dedup secure_flag, remove vestigial social_query, drop PersistedImportSession, LoginCommand rename, DeleteAccountDeps, PersonId macro, ReviewSortBy rename, TUI Command for fs::read, generic PaginatedResponse<T>, noop ports for production fallbacks
26 lines
579 B
Rust
26 lines
579 B
Rust
use domain::testing::FakeDiaryQuery;
|
|
use std::sync::Arc;
|
|
|
|
use crate::{diary::get_diary, diary::queries::GetDiaryQuery};
|
|
|
|
#[tokio::test]
|
|
async fn returns_empty_page() {
|
|
let diary = FakeDiaryQuery::new() as Arc<dyn domain::ports::DiaryQuery>;
|
|
|
|
let result = get_diary::execute(
|
|
&diary,
|
|
GetDiaryQuery {
|
|
limit: None,
|
|
offset: None,
|
|
sort_by: None,
|
|
movie_id: None,
|
|
user_id: None,
|
|
},
|
|
)
|
|
.await
|
|
.unwrap();
|
|
|
|
assert!(result.items.is_empty());
|
|
assert_eq!(result.total_count, 0);
|
|
}
|