use of com.nexblocks.authguard.emb.model.Message in project AuthGuard by AuthGuard.
the class EmailResetTokenSubscriberTest method onWrongMessageType.
@Test
void onWrongMessageType() {
final AccountTokenDO accountToken = AccountTokenDO.builder().token("token").build();
final AccountBO account = AccountBO.builder().email(AccountEmailBO.builder().email("user@test.net").build()).build();
final ResetTokenMessage messageBody = new ResetTokenMessage(account, accountToken);
final Message message = Messages.passwordlessGenerated(messageBody).withEventType(EventType.ADMIN);
emailResetTokenSubscriber.onMessage(message);
Mockito.verify(emailProvider, Mockito.never()).send(Mockito.any());
}
Aggregations