Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Jobs/PasswordResetEmailTest.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | public function testPasswordResetEmailHandle() | ||||
// Assert the email sending job was pushed once | // Assert the email sending job was pushed once | ||||
Mail::assertSent(PasswordReset::class, 1); | Mail::assertSent(PasswordReset::class, 1); | ||||
// Assert the mail was sent to the code's email | // Assert the mail was sent to the code's email | ||||
Mail::assertSent(PasswordReset::class, function ($mail) use ($code) { | Mail::assertSent(PasswordReset::class, function ($mail) use ($code) { | ||||
return $mail->hasTo($code->user->getSetting('external_email')); | return $mail->hasTo($code->user->getSetting('external_email')); | ||||
}); | }); | ||||
// Assert sender | |||||
Mail::assertSent(PasswordReset::class, function ($mail) { | |||||
return $mail->hasFrom(\config('mail.from.address'), \config('mail.from.name')) | |||||
&& $mail->hasReplyTo(\config('mail.reply_to.address'), \config('mail.reply_to.name')); | |||||
}); | |||||
} | } | ||||
} | } |