-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Pascal Baljet <[email protected]>
- Loading branch information
1 parent
8180c11
commit faa03bb
Showing
3 changed files
with
14 additions
and
13 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
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
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
use Illuminate\Mail\Mailable; | ||
use Illuminate\Support\Facades\Mail; | ||
use Illuminate\Support\Testing\Fakes\MailFake; | ||
use ProtoneMedia\LaravelVerifyNewEmail\InvalidEmailVerificationModelException; | ||
use ProtoneMedia\LaravelVerifyNewEmail\Mail\VerifyFirstEmail; | ||
use ProtoneMedia\LaravelVerifyNewEmail\Mail\VerifyNewEmail; | ||
|
@@ -102,14 +103,15 @@ public function it_can_generate_a_token_and_mail_it_to_the_new_email_address() | |
/** @test */ | ||
public function it_can_regenerate_a_token_and_mail_it() | ||
{ | ||
Mail::fake(); | ||
$mailRoot = Mail::getFacadeRoot(); | ||
Mail::swap(new MailFake($mailRoot)); | ||
|
||
$user = $this->user(); | ||
|
||
$pendingUserEmailFirst = $user->newEmail('[email protected]'); | ||
|
||
// reset mail fake | ||
Mail::fake(); | ||
Mail::swap(new MailFake($mailRoot)); | ||
Mail::assertNothingQueued(); | ||
|
||
$pendingUserEmailSecond = $user->resendPendingEmailVerificationMail(); | ||
|