]> BookStack Code Mirror - bookstack/blobdiff - tests/Auth/AuthTest.php
Guest create page: name field autofocus
[bookstack] / tests / Auth / AuthTest.php
index 8494697667ab20762bacd65ec663ade5615dd939..3220b2aac72138c00a965093cd5d59e54d4c6ff5 100644 (file)
@@ -3,7 +3,6 @@
 namespace Tests\Auth;
 
 use BookStack\Auth\Access\Mfa\MfaSession;
-use BookStack\Entities\Models\Page;
 use Illuminate\Testing\TestResponse;
 use Tests\TestCase;
 
@@ -58,8 +57,7 @@ class AuthTest extends TestCase
     public function test_login_redirects_to_initially_requested_url_correctly()
     {
         config()->set('app.url', 'http://localhost');
-        /** @var Page $page */
-        $page = Page::query()->first();
+        $page = $this->entities->page();
 
         $this->get($page->getUrl())->assertRedirect(url('/login'));
         $this->login('[email protected]', 'password')