diff --git a/crates/adapters/http-axum/src/tests/mod.rs b/crates/adapters/http-axum/src/tests/mod.rs deleted file mode 100644 index afb3afae..00000000 --- a/crates/adapters/http-axum/src/tests/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -mod api_handlers; -mod context; diff --git a/crates/adapters/http-axum/src/html/forms_tests.rs b/crates/adapters/http-axum/tests/log_review_form_test.rs similarity index 100% rename from crates/adapters/http-axum/src/html/forms_tests.rs rename to crates/adapters/http-axum/tests/log_review_form_test.rs diff --git a/crates/adapters/http-axum/src/tests/api_handlers.rs b/crates/bootstrap/tests/http_handlers/api_handlers_test.rs similarity index 100% rename from crates/adapters/http-axum/src/tests/api_handlers.rs rename to crates/bootstrap/tests/http_handlers/api_handlers_test.rs diff --git a/crates/adapters/http-axum/src/tests/context.rs b/crates/bootstrap/tests/http_handlers/app_context_test.rs similarity index 100% rename from crates/adapters/http-axum/src/tests/context.rs rename to crates/bootstrap/tests/http_handlers/app_context_test.rs diff --git a/crates/adapters/http-axum/src/extractors/tests.rs b/crates/bootstrap/tests/http_handlers/extractors_test.rs similarity index 100% rename from crates/adapters/http-axum/src/extractors/tests.rs rename to crates/bootstrap/tests/http_handlers/extractors_test.rs diff --git a/crates/domain/src/testing/fakes/store_user.rs b/crates/domain/src/testing/fakes/store_user.rs index d19008a9..0d76498f 100644 --- a/crates/domain/src/testing/fakes/store_user.rs +++ b/crates/domain/src/testing/fakes/store_user.rs @@ -58,10 +58,14 @@ impl UserRepository for InMemoryStore { Ok(self.users.read().unwrap().get(&id.value()).cloned()) } + /// Ordered by email ascending like the real query. Diary stats are stubbed + /// (review count 0, no last activity); only the identity fields are real. async fn list_with_stats(&self) -> Result, DomainError> { let store = self.users.read().unwrap(); - Ok(store - .values() + let mut users: Vec<_> = store.values().collect(); + users.sort_by(|a, b| a.email().value().cmp(b.email().value())); + Ok(users + .into_iter() .map(|u| { UserSummary::new( u.id().clone(),