From c079e6dc4efd02e2deb1b2c8a0b2ea4dff8221de Mon Sep 17 00:00:00 2001 From: Mohammad Alavi Date: Sat, 11 Dec 2021 13:38:21 +0330 Subject: [PATCH] add test --- .../Unit/SendVerificationEmailActionTest.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 app/Containers/AppSection/Authentication/Tests/Unit/SendVerificationEmailActionTest.php diff --git a/app/Containers/AppSection/Authentication/Tests/Unit/SendVerificationEmailActionTest.php b/app/Containers/AppSection/Authentication/Tests/Unit/SendVerificationEmailActionTest.php new file mode 100644 index 000000000..456c914ba --- /dev/null +++ b/app/Containers/AppSection/Authentication/Tests/Unit/SendVerificationEmailActionTest.php @@ -0,0 +1,33 @@ +unverified()->create(); + // enable email verification + config(['appSection-authentication.require_email_verification' => true]); + $request = SendVerificationEmailRequest::injectData([], $unverifiedUser); + + + app(SendVerificationEmailAction::class)->run($request); + + Notification::assertSentTo($unverifiedUser, VerifyEmail::class); + } +}