]> BookStack Code Mirror - bookstack/blobdiff - tests/User/UserSearchTest.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / tests / User / UserSearchTest.php
index 1387311ce7576d131e6b648197deedf5d9d69612..76efbf4af9ba27d7405911373b0e4bd1a362a7e9 100644 (file)
@@ -57,8 +57,7 @@ class UserSearchTest extends TestCase
     public function test_select_requires_logged_in_user()
     {
         $this->setSettings(['app-public' => true]);
-        $defaultUser = User::getDefault();
-        $this->permissions->grantUserRolePermissions($defaultUser, ['users-manage']);
+        $this->permissions->grantUserRolePermissions($this->users->guest(), ['users-manage']);
 
         $resp = $this->get('/search/users/select?search=a');
         $this->assertPermissionError($resp);