Skip to content

Commit

Permalink
Update AdminTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
lanedirt committed May 18, 2024
1 parent 744b98b commit 7592520
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/Feature/AdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ class AdminTest extends AccountTestCase
*/
public function testNormalUserAdminAccessDenied(): void
{
// Sanity check: if current user is admin (which could be if it's the first user created)
// then we need to create a new user to test this.
if (auth()->user()->hasRole('admin')) {
$this->createAndLoginUser();
}
// Remove the admin role from the current user if it has it.
$this->artisan('ogamex:remove-admin-role', ['username' => auth()->user()->username]);

// Verify that on overview page the admin bar doesn't show up.
$response = $this->get('/overview');
Expand Down

0 comments on commit 7592520

Please sign in to comment.