From abac9451435d4d843007ad091e7a83c9ab2126fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Drunen?= Date: Fri, 29 Dec 2023 23:16:11 +0100 Subject: [PATCH] Test PasswordChanged mail --- app/Mail/PasswordChanged.php | 9 ++++----- tests/Unit/Mail/PasswordChangedTest.php | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 tests/Unit/Mail/PasswordChangedTest.php diff --git a/app/Mail/PasswordChanged.php b/app/Mail/PasswordChanged.php index 6b9d7f18..a0202ade 100644 --- a/app/Mail/PasswordChanged.php +++ b/app/Mail/PasswordChanged.php @@ -11,11 +11,10 @@ class PasswordChanged extends Mailable use Queueable; use SerializesModels; - protected $updated_at; - - public function __construct($updated_at) - { - $this->updated_at = $updated_at; + public function __construct( + protected $updated_at, + ) { + // } public function build() diff --git a/tests/Unit/Mail/PasswordChangedTest.php b/tests/Unit/Mail/PasswordChangedTest.php new file mode 100644 index 00000000..c557f9b1 --- /dev/null +++ b/tests/Unit/Mail/PasswordChangedTest.php @@ -0,0 +1,16 @@ +assertSeeInText('Heads up! Your password has been changed (2023-12-05 18:00:00 CEST).'); + } +}