X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ee24635e06a8c01d751f80caba47c57f76e8989d..refs/heads/ldap_host_failover:/tests/OpenGraphTest.php diff --git a/tests/OpenGraphTest.php b/tests/OpenGraphTest.php index 3f807f024..d6f535718 100644 --- a/tests/OpenGraphTest.php +++ b/tests/OpenGraphTest.php @@ -2,10 +2,6 @@ namespace Tests; -use BookStack\Entities\Models\Book; -use BookStack\Entities\Models\Bookshelf; -use BookStack\Entities\Models\Chapter; -use BookStack\Entities\Models\Page; use BookStack\Entities\Repos\BaseRepo; use BookStack\Entities\Repos\BookRepo; use Illuminate\Support\Str; @@ -18,7 +14,7 @@ class OpenGraphTest extends TestCase public function test_page_tags() { - $page = Page::query()->first(); + $page = $this->entities->page(); $resp = $this->asEditor()->get($page->getUrl()); $tags = $this->getOpenGraphTags($resp); @@ -29,7 +25,7 @@ class OpenGraphTest extends TestCase public function test_chapter_tags() { - $chapter = Chapter::query()->first(); + $chapter = $this->entities->chapter(); $resp = $this->asEditor()->get($chapter->getUrl()); $tags = $this->getOpenGraphTags($resp); @@ -40,7 +36,7 @@ class OpenGraphTest extends TestCase public function test_book_tags() { - $book = Book::query()->first(); + $book = $this->entities->book(); $resp = $this->asEditor()->get($book->getUrl()); $tags = $this->getOpenGraphTags($resp); @@ -60,7 +56,7 @@ class OpenGraphTest extends TestCase public function test_shelf_tags() { - $shelf = Bookshelf::query()->first(); + $shelf = $this->entities->shelf(); $resp = $this->asEditor()->get($shelf->getUrl()); $tags = $this->getOpenGraphTags($resp);