fake user store: list_with_stats sorted by email

This commit is contained in:
2026-10-25 22:52:41 +01:00
parent 5c5a8c3326
commit 07c8b011d8
6 changed files with 6 additions and 4 deletions

View File

@@ -0,0 +1,26 @@
#[test]
fn prebuilt_deps_share_port_instances_with_repos() {
use std::sync::Arc;
let repos = crate::extractors::tests::test_repositories();
let user = Arc::clone(&repos.user);
let follow_graph = Arc::clone(&repos.follow_graph);
let state = crate::extractors::tests::build_test_state_from(
repos,
Arc::new(domain::testing::PanicAuthService),
);
assert!(
Arc::ptr_eq(&state.app_ctx.deps.users.get_local_profile.user, &user),
"deps.users.get_local_profile.user must be the same Arc as the Repositories it was built from"
);
assert!(
Arc::ptr_eq(&state.app_ctx.deps.social.query.follow_graph, &follow_graph),
"deps.social.query.follow_graph must be the same Arc as the Repositories it was built from"
);
assert_eq!(
state.app_ctx.deps.users.get_local_profile.instance, state.app_ctx.instance,
"prebuilt deps must carry the context's InstanceIdentity"
);
}