X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/2cfa37399c6b7f5b743db8223dd90d3dba68d6fa..refs/pull/2227/head:/tests/User/UserApiTokenTest.php diff --git a/tests/User/UserApiTokenTest.php b/tests/User/UserApiTokenTest.php index 460752fc2..f738eb579 100644 --- a/tests/User/UserApiTokenTest.php +++ b/tests/User/UserApiTokenTest.php @@ -1,4 +1,4 @@ -getEditor(); + $user = $this->getViewer(); $resp = $this->actingAs($user)->get($user->getEditUrl()); $resp->assertDontSeeText('API Tokens'); @@ -30,9 +30,9 @@ class UserApiTokenTest extends TestCase { $viewer = $this->getViewer(); $editor = $this->getEditor(); - $this->giveUserPermissions($editor, ['users-manage']); + $this->giveUserPermissions($viewer, ['users-manage']); - $resp = $this->actingAs($editor)->get($viewer->getEditUrl()); + $resp = $this->actingAs($viewer)->get($editor->getEditUrl()); $resp->assertSeeText('API Tokens'); $resp->assertDontSeeText('Create Token'); }