From 6b3770451e4dad9fb2bf1e98326583f07c41d20e Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Thu, 9 Jan 2025 01:09:59 +0530 Subject: [PATCH] feat: rename mailer mock --- .../application/port/output/mailer/account_validation_link.rs | 2 +- src/identity/application/services/register_user/service.rs | 4 ++-- .../application/services/resend_verification_email/service.rs | 4 ++-- src/identity/application/services/set_user_admin/service.rs | 2 +- src/identity/application/services/update_email/service.rs | 4 ++-- src/identity/application/services/update_password/service.rs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/identity/application/port/output/mailer/account_validation_link.rs b/src/identity/application/port/output/mailer/account_validation_link.rs index 533aa5c..9a380e3 100644 --- a/src/identity/application/port/output/mailer/account_validation_link.rs +++ b/src/identity/application/port/output/mailer/account_validation_link.rs @@ -30,7 +30,7 @@ pub mod tests { use std::sync::Arc; - pub fn mock_account_validation_link_db_port( + pub fn mock_account_validation_link_mailer_port( times: Option, ) -> AccountValidationLinkOutMailerPortObj { let mut m = MockAccountValidationLinkOutMailerPort::new(); diff --git a/src/identity/application/services/register_user/service.rs b/src/identity/application/services/register_user/service.rs index 3acb971..469f875 100644 --- a/src/identity/application/services/register_user/service.rs +++ b/src/identity/application/services/register_user/service.rs @@ -127,7 +127,7 @@ mod tests { IS_CALLED_ONLY_ONCE, RETURNS_RANDOM_STRING.into(), )) - .mailer_account_validation_link_adapter(mock_account_validation_link_db_port( + .mailer_account_validation_link_adapter(mock_account_validation_link_mailer_port( IS_CALLED_ONLY_ONCE, )) .get_uuid(mock_get_uuid(IS_CALLED_ONLY_ONCE)) @@ -172,7 +172,7 @@ mod tests { IS_NEVER_CALLED, RETURNS_RANDOM_STRING.into(), )) - .mailer_account_validation_link_adapter(mock_account_validation_link_db_port( + .mailer_account_validation_link_adapter(mock_account_validation_link_mailer_port( IS_NEVER_CALLED, )) .get_uuid(mock_get_uuid(IS_NEVER_CALLED)) diff --git a/src/identity/application/services/resend_verification_email/service.rs b/src/identity/application/services/resend_verification_email/service.rs index 57f9259..2306323 100644 --- a/src/identity/application/services/resend_verification_email/service.rs +++ b/src/identity/application/services/resend_verification_email/service.rs @@ -77,7 +77,7 @@ mod tests { IS_CALLED_ONLY_ONCE, RETURNS_FALSE, )) - .mailer_account_validation_link_adapter(mock_account_validation_link_db_port( + .mailer_account_validation_link_adapter(mock_account_validation_link_mailer_port( IS_CALLED_ONLY_ONCE, )) .build() @@ -105,7 +105,7 @@ mod tests { secret.into(), )) .db_email_exists_adapter(mock_email_exists_db_port(IS_CALLED_ONLY_ONCE, RETURNS_TRUE)) - .mailer_account_validation_link_adapter(mock_account_validation_link_db_port( + .mailer_account_validation_link_adapter(mock_account_validation_link_mailer_port( IS_NEVER_CALLED, )) .build() diff --git a/src/identity/application/services/set_user_admin/service.rs b/src/identity/application/services/set_user_admin/service.rs index a6e34b0..b3f2448 100644 --- a/src/identity/application/services/set_user_admin/service.rs +++ b/src/identity/application/services/set_user_admin/service.rs @@ -4,7 +4,7 @@ use super::*; -struct SetUserAdminService; +pub struct SetUserAdminService; #[async_trait::async_trait] impl SetUserAdminUseCase for SetUserAdminService { diff --git a/src/identity/application/services/update_email/service.rs b/src/identity/application/services/update_email/service.rs index c6089b8..6ee0d02 100644 --- a/src/identity/application/services/update_email/service.rs +++ b/src/identity/application/services/update_email/service.rs @@ -100,7 +100,7 @@ mod tests { IS_CALLED_ONLY_ONCE, RETURNS_RANDOM_STRING.into(), )) - .mailer_account_validation_link_adapter(mock_account_validation_link_db_port( + .mailer_account_validation_link_adapter(mock_account_validation_link_mailer_port( IS_CALLED_ONLY_ONCE, )) .build() @@ -124,7 +124,7 @@ mod tests { IS_NEVER_CALLED, RETURNS_RANDOM_STRING.into(), )) - .mailer_account_validation_link_adapter(mock_account_validation_link_db_port( + .mailer_account_validation_link_adapter(mock_account_validation_link_mailer_port( IS_NEVER_CALLED, )) .build() diff --git a/src/identity/application/services/update_password/service.rs b/src/identity/application/services/update_password/service.rs index 1730c12..feee380 100644 --- a/src/identity/application/services/update_password/service.rs +++ b/src/identity/application/services/update_password/service.rs @@ -4,7 +4,7 @@ use super::*; -struct UpdatePasswordService; +pub struct UpdatePasswordService; #[async_trait::async_trait] impl UpdatePasswordUseCase for UpdatePasswordService {