Skip to content

Commit

Permalink
Update tests/Authentication/Filters/SessionFilterTest.php
Browse files Browse the repository at this point in the history
Co-authored-by: kenjis <[email protected]>
  • Loading branch information
mshannaq and kenjis authored Aug 21, 2023
1 parent e922392 commit 292cb3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Authentication/Filters/SessionFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ public function testBlocksInactiveUsers(): void
public function testStoreRedirectsToEntraceUrlIntoSession(): void
{
$result = $this->call('get', 'protected-route');

$result->assertRedirectTo('/login');
$this->assertNotEmpty($_SESSION['beforeLoginUrl']);
$this->assertSame(site_url('protected-route'), $_SESSION['beforeLoginUrl']);

$session = session();
$this->assertNotEmpty($session->get('beforeLogginUrl'));
$this->assertSame(site_url('protected-route'), $session->get('beforeLogginUrl'));
}
}

0 comments on commit 292cb3c

Please sign in to comment.