namespace Tests\User;
-use BookStack\Entities\Models\Bookshelf;
-use BookStack\Entities\Models\Page;
use Tests\TestCase;
class UserPreferencesTest extends TestCase
public function test_shelf_view_type_change()
{
$editor = $this->getEditor();
- /** @var Bookshelf $shelf */
- $shelf = Bookshelf::query()->first();
+ $shelf = $this->entities->shelf();
setting()->putUser($editor, 'bookshelf_view_type', 'list');
$resp = $this->actingAs($editor)->get($shelf->getUrl())->assertSee('Grid View');
public function test_update_code_language_favourite()
{
$editor = $this->getEditor();
- $page = Page::query()->first();
+ $page = $this->entities->page();
$this->actingAs($editor);
$this->patch('/settings/users/update-code-language-favourite', ['language' => 'php', 'active' => true]);