Skip to content

Commit

Permalink
Use assertRedirectToRoute in some places
Browse files Browse the repository at this point in the history
  • Loading branch information
syropian committed Mar 9, 2024
1 parent 26f4589 commit 9278a79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/Feature/Controllers/AuthController/LogoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
it('logs out an authenticated user', function () {
$this->login()
->get('/logout')
->assertRedirect(route('auth.show'));
->assertRedirectToRoute('auth.show');

$this->assertGuest();
});

it('redirects guest users back to the login page')
->get('/logout')
->assertRedirect('/login');
->assertRedirectToRoute('login.show');
4 changes: 2 additions & 2 deletions tests/Feature/Controllers/AuthController/RevokeGrantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

$this
->login()
->post('/revoke-grant')->assertRedirect(route('auth.destroy'));
->post('/revoke-grant')->assertRedirectToRoute('auth.destroy');

expect(auth()->user()->access_token)->toBeNull();
});
Expand All @@ -33,4 +33,4 @@

it('redirects guest users back to the login page')
->post('/revoke-grant')
->assertRedirect('/login');
->assertRedirectToRoute('login.show');
7 changes: 0 additions & 7 deletions tests/Unit/ExampleTest.php

This file was deleted.

0 comments on commit 9278a79

Please sign in to comment.