mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Guest control: Cleaned methods involved in fetching/handling
- Moves guest user caching from User class to app container for simplicity. - Updates test to use simpler $this->users->guest() method for consistency. - Streamlined helpers to avoid function overlap for simplicity. - Extracted user profile dropdown while doing changes.
This commit is contained in:
@ -191,7 +191,7 @@ class UserManagementTest extends TestCase
|
||||
|
||||
public function test_guest_profile_shows_limited_form()
|
||||
{
|
||||
$guest = User::getDefault();
|
||||
$guest = $this->users->guest();
|
||||
$resp = $this->asAdmin()->get('/settings/users/' . $guest->id);
|
||||
$resp->assertSee('Guest');
|
||||
$this->withHtml($resp)->assertElementNotExists('#password');
|
||||
@ -199,7 +199,7 @@ class UserManagementTest extends TestCase
|
||||
|
||||
public function test_guest_profile_cannot_be_deleted()
|
||||
{
|
||||
$guestUser = User::getDefault();
|
||||
$guestUser = $this->users->guest();
|
||||
$resp = $this->asAdmin()->get('/settings/users/' . $guestUser->id . '/delete');
|
||||
$resp->assertSee('Delete User');
|
||||
$resp->assertSee('Guest');
|
||||
|
Reference in New Issue
Block a user