-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct redirect after validation code verification
- Loading branch information
1 parent
f377fcc
commit 738c695
Showing
2 changed files
with
12 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -720,13 +720,22 @@ public function test_azure_mail_with_correct_code_existing_user(): void | |
$_SESSION['new_user'] = false; | ||
$_SESSION['azure_mail'] = "[email protected]"; | ||
$_SESSION['form_email'] = "[email protected]"; | ||
$redirect_url = $_SESSION['after_login_redirect']; | ||
|
||
$result = $this->controller(Auth::class) | ||
->execute('verify_verification_code'); | ||
|
||
/* Check that user's azure_mail has been updated in the DB */ | ||
$azureMailInDb = $userModel->select('azure_mail') | ||
->find($userId)['azure_mail']; | ||
$this->assertEquals($_SESSION['azure_mail'], $azureMailInDb); | ||
|
||
/* Check that the user is logged in */ | ||
$result->assertSessionHas('logged_in', true); | ||
|
||
/* Check if user has been redirected correctly */ | ||
$result->assertRedirect(); | ||
$result->assertRedirectTo($redirect_url); | ||
} | ||
|
||
/** | ||
|