Skip to content

Commit 7142f9b

Browse files
committed
Redirect bugfix
1 parent 456f163 commit 7142f9b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-verify-new-email` will be documented in this file
44

5+
## 1.3.1 - 2010-12-16
6+
7+
- Redirect bugfix
8+
59
## 1.3.0 - 2020-10-31
610

711
- Support for PHP 8.0

src/Http/VerifiesPendingEmails.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function verify(string $token)
2424
})->user;
2525

2626
if (config('verify-new-email.login_after_verification')) {
27-
return Auth::guard()->login($user, config('verify-new-email.login_remember'));
27+
Auth::guard()->login($user, config('verify-new-email.login_remember'));
2828
}
2929

3030
return $this->authenticated();

tests/VerifyNewEmailControllerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class VerifyNewEmailControllerTest extends TestCase
1414
{
15-
public function setUp():void
15+
public function setUp(): void
1616
{
1717
parent::setUp();
1818

@@ -57,8 +57,9 @@ public function it_can_login_the_user()
5757

5858
config(['verify-new-email.login_after_verification' => true]);
5959

60-
app(VerifyNewEmailController::class)->verify($pendingUserEmail->token);
60+
$response = app(VerifyNewEmailController::class)->verify($pendingUserEmail->token);
6161

62+
$this->assertInstanceOf(RedirectResponse::class, $response);
6263
$this->assertAuthenticatedAs($user);
6364
}
6465

0 commit comments

Comments
 (0)