feat(contact): send confirmation email to form submitter
Deploy Backend / deploy (push) Successful in 47s
Deploy Backend / deploy (push) Successful in 47s
Keep admin notify to CONTACT_NOTIFY_TO and also mail the submitter a branded confirmation so testers are not confused by missing inbox mail.
This commit is contained in:
1 parent
1c8086bad1
commit
fa32df60a9
7 files changed
+168
-25
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Mail\ContactMessageConfirmed;
|
||||
use App\Mail\ContactMessageReceived;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
@@ -35,6 +36,11 @@ class ContactMessageTest extends TestCase
|
||||
&& $mail->hasTo('support@parsaaghayi.ir')
|
||||
&& $mail->hasTo('parsa.aghaee@gmail.com');
|
||||
});
|
||||
|
||||
Mail::assertSent(ContactMessageConfirmed::class, function (ContactMessageConfirmed $mail) {
|
||||
return $mail->contactMessage->email === 'ali@example.com'
|
||||
&& $mail->hasTo('ali@example.com');
|
||||
});
|
||||
}
|
||||
|
||||
public function test_the_public_form_rejects_invalid_payloads(): void
|
||||
|
||||
Reference in new issue
Block a user