-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Don't Track Option that stops ALL emails
- Loading branch information
1 parent
70f45a4
commit a4b31df
Showing
1 changed file
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -298,15 +298,17 @@ public function it_doesnt_track_if_told_not_to() | |
{ | ||
$faker = Factory::create(); | ||
$email = $faker->email; | ||
$anotherEmail = $faker->email; | ||
$subject = $faker->sentence; | ||
$name = $faker->firstName . ' ' .$faker->lastName; | ||
View::addLocation(__DIR__); | ||
try { | ||
Mail::send('email.test', [], function ($message) use ($email, $subject, $name) { | ||
Mail::send('email.test', [], function ($message) use ($email, $anotherEmail, $subject, $name) { | ||
$message->from('[email protected]', 'From Name'); | ||
$message->sender('[email protected]', 'Sender Name'); | ||
|
||
$message->to($email, $name); | ||
$message->to($anotherEmail, $name); | ||
|
||
$message->cc('[email protected]', 'CC Name'); | ||
$message->bcc('[email protected]', 'BCC Name'); | ||
|
@@ -323,13 +325,20 @@ public function it_doesnt_track_if_told_not_to() | |
} | ||
|
||
$this->assertDatabaseMissing('sent_emails', [ | ||
'recipient' => $name.' <'.$email.'>', | ||
'subject' => $subject, | ||
'sender_name' => 'From Name', | ||
'sender_email' => '[email protected]', | ||
'recipient_name' => $name, | ||
'recipient_email' => $email, | ||
]); | ||
'subject' => $subject, | ||
'sender_name' => 'From Name', | ||
'sender_email' => '[email protected]', | ||
'recipient_name' => $name, | ||
'recipient_email' => $email, | ||
]); | ||
|
||
$this->assertDatabaseMissing('sent_emails', [ | ||
'subject' => $subject, | ||
'sender_name' => 'From Name', | ||
'sender_email' => '[email protected]', | ||
'recipient_name' => $name, | ||
'recipient_email' => $anotherEmail, | ||
]); | ||
} | ||
|
||
/** | ||
|