feat: owner manage employees #138
1 changed files with 24 additions and 0 deletions
|
@ -412,4 +412,28 @@ mod tests {
|
|||
.when(IdentityCommand::SetAdmin(cmd))
|
||||
.then_expect_events(vec![expected]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_user_aggregate_resend_verification_email() {
|
||||
use crate::identity::application::services::resend_verification_email::{
|
||||
command::*, service::*, *,
|
||||
};
|
||||
|
||||
let cmd = ResendVerificationEmailCommand::get_cmd();
|
||||
let expected = IdentityEvent::VerificationEmailResent;
|
||||
|
||||
let mut services = MockIdentityServicesInterface::new();
|
||||
services
|
||||
.expect_resend_verification_email()
|
||||
.times(IS_CALLED_ONLY_ONCE.unwrap())
|
||||
.return_const(ResendVerificationEmailService::mock_service(
|
||||
IS_CALLED_ONLY_ONCE,
|
||||
cmd.clone(),
|
||||
));
|
||||
|
||||
UserTestFramework::with(Arc::new(services))
|
||||
.given_no_previous_events()
|
||||
.when(IdentityCommand::ResendVerificationEmail(cmd))
|
||||
.then_expect_events(vec![expected]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue