diff --git a/app/Mail/ResetPassword.php b/app/Mail/ResetPassword.php index 0cdc91fe..b0e614b1 100644 --- a/app/Mail/ResetPassword.php +++ b/app/Mail/ResetPassword.php @@ -12,7 +12,7 @@ class ResetPassword extends Mailable use SerializesModels; public function __construct( - protected $token + protected $token, ) { // } diff --git a/app/Mail/VerifyRegistration.php b/app/Mail/VerifyRegistration.php index 0e65557d..b20c7f17 100644 --- a/app/Mail/VerifyRegistration.php +++ b/app/Mail/VerifyRegistration.php @@ -12,11 +12,10 @@ class VerifyRegistration extends Mailable use Queueable; use SerializesModels; - protected $user; - - public function __construct(User $user) - { - $this->user = $user; + public function __construct( + protected User $user, + ) { + // } public function build() diff --git a/tests/Unit/Mail/ResetPasswordTest.php b/tests/Unit/Mail/ResetPasswordTest.php index 4f786b13..d8b8be66 100644 --- a/tests/Unit/Mail/ResetPasswordTest.php +++ b/tests/Unit/Mail/ResetPasswordTest.php @@ -1,6 +1,6 @@ create([ + 'name' => 'John Doe', + 'verification_token' => 'abc123', + ]); + + $mailable = new VerifyRegistration($user); + + $mailable + ->assertSeeInText('Welcome aboard, John Doe') + ->assertSeeInText('We\'re going to help you get insight into your personal finances.') + ->assertSeeInText('No more dealing with pesky, half-assed spreadsheets.') + ->assertSeeInHtml('Verify', false); + } +} diff --git a/tests/Unit/Mail/WeeklyReportTest.php b/tests/Unit/Mail/WeeklyReportTest.php index d5c0f08d..4b56410f 100644 --- a/tests/Unit/Mail/WeeklyReportTest.php +++ b/tests/Unit/Mail/WeeklyReportTest.php @@ -1,6 +1,6 @@