test: get_users use case
Fake list_with_stats now returns stored users (was always empty).
This commit is contained in:
@@ -59,7 +59,21 @@ impl UserRepository for InMemoryStore {
|
||||
}
|
||||
|
||||
async fn list_with_stats(&self) -> Result<Vec<UserSummary>, DomainError> {
|
||||
Ok(vec![])
|
||||
let store = self.users.read().unwrap();
|
||||
Ok(store
|
||||
.values()
|
||||
.map(|u| {
|
||||
UserSummary::new(
|
||||
u.id().clone(),
|
||||
u.email().clone(),
|
||||
u.username().clone(),
|
||||
u.display_name().map(str::to_string),
|
||||
0,
|
||||
None,
|
||||
u.avatar_path().map(str::to_string),
|
||||
)
|
||||
})
|
||||
.collect())
|
||||
}
|
||||
|
||||
async fn update_profile(
|
||||
|
||||
Reference in New Issue
Block a user