feat(auth): enhance password reset attempt handling with new reasons and update related services
This commit is contained in:
@@ -116,6 +116,7 @@ class NotificationMailServiceTest extends TestCase
|
||||
$this->tenant->update(['website_type_code' => $websiteType->codigo]);
|
||||
$attempt = $this->user->resetPasswordAttempts()->create([
|
||||
'codigo' => '0123',
|
||||
'reason' => ResetPasswordAttempt::REASON_STAFF_CREATED,
|
||||
]);
|
||||
|
||||
app(NotificationMailService::class)->sendPasswordResetCode(
|
||||
@@ -127,10 +128,10 @@ class NotificationMailServiceTest extends TestCase
|
||||
Mail::assertSent(Mailable::class, function (Mailable $mail): bool {
|
||||
$rendered = $mail->render();
|
||||
|
||||
return str_contains(
|
||||
$rendered,
|
||||
'https://scanner.mail.local/recuperar-contrasena/codigo?email=ada%40example.com',
|
||||
);
|
||||
return str_contains($rendered, 'https://scanner.mail.local/recuperar-contrasena/codigo')
|
||||
&& str_contains($rendered, 'email=ada%40example.com')
|
||||
&& str_contains($rendered, 'code=0123')
|
||||
&& str_contains($rendered, 'Crear mi');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user