X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/7b100ef361c3a1a05d1ac6e9894619662424caf2..refs/pull/5280/head:/tests/Entity/CommentSettingTest.php diff --git a/tests/Entity/CommentSettingTest.php b/tests/Entity/CommentSettingTest.php index 0e3199979..7de457441 100644 --- a/tests/Entity/CommentSettingTest.php +++ b/tests/Entity/CommentSettingTest.php @@ -2,34 +2,27 @@ namespace Tests\Entity; -use BookStack\Entities\Models\Page; use Tests\TestCase; class CommentSettingTest extends TestCase { - protected $page; - - protected function setUp(): void - { - parent::setUp(); - $this->page = Page::query()->first(); - } - public function test_comment_disable() { + $page = $this->entities->page(); $this->setSettings(['app-disable-comments' => 'true']); $this->asAdmin(); - $resp = $this->asAdmin()->get($this->page->getUrl()); + $resp = $this->asAdmin()->get($page->getUrl()); $this->withHtml($resp)->assertElementNotExists('.comments-list'); } public function test_comment_enable() { + $page = $this->entities->page(); $this->setSettings(['app-disable-comments' => 'false']); $this->asAdmin(); - $resp = $this->asAdmin()->get($this->page->getUrl()); + $resp = $this->asAdmin()->get($page->getUrl()); $this->withHtml($resp)->assertElementExists('.comments-list'); } }