feat: account deletion request and active-user check
This commit is contained in:
@@ -7,7 +7,7 @@ use bootstrap::Repositories;
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
models::GeneratedToken,
|
||||
ports::{AuthService, FollowGraphQuery, PersonQuery, SearchPort, UserRepository},
|
||||
ports::{AuthService, PersonQuery, SearchPort, UserRepository},
|
||||
testing::{
|
||||
PanicAuthService, PanicDiaryExporter, PanicDiaryQuery, PanicDocumentParser,
|
||||
PanicEventPublisher, PanicGoalCommand, PanicGoalQuery, PanicImportProfileRepository,
|
||||
@@ -168,15 +168,15 @@ pub fn test_app_state_with_search_port(
|
||||
build_test_state_from(repos, Arc::new(PanicAuthService))
|
||||
}
|
||||
|
||||
/// Test state with `follow_graph` overridden BEFORE `build_deps` runs, so the
|
||||
/// stub is visible from both `app_ctx.repos.follow_graph` and the prebuilt
|
||||
/// `deps.social.query` that the social handlers actually read from.
|
||||
pub fn test_app_state_with_follow_graph(
|
||||
follow_graph: Arc<dyn FollowGraphQuery>,
|
||||
/// Test state whose repositories are adjusted by `adjust` BEFORE `build_deps`
|
||||
/// runs, for tests that need more than one stub swapped in (e.g. a follow graph
|
||||
/// plus the live user that authenticated routes now look up).
|
||||
pub fn test_app_state_with_repos(
|
||||
adjust: impl FnOnce(&mut Repositories),
|
||||
auth_service: Arc<dyn AuthService>,
|
||||
) -> http_axum::state::AppState {
|
||||
let mut repos = test_repositories();
|
||||
repos.follow_graph = follow_graph;
|
||||
adjust(&mut repos);
|
||||
build_test_state_from(repos, auth_service)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user