X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/da1cea06ca5db56a9635bf8bb01da2516d601620..refs/heads/development:/tests/Entity/CommentSettingTest.php diff --git a/tests/Entity/CommentSettingTest.php b/tests/Entity/CommentSettingTest.php index 3c8cae68c..7de457441 100644 --- a/tests/Entity/CommentSettingTest.php +++ b/tests/Entity/CommentSettingTest.php @@ -1,35 +1,28 @@ -page = Page::first(); - } +use Tests\TestCase; +class CommentSettingTest extends TestCase +{ public function test_comment_disable() { - $this->asAdmin(); - + $page = $this->entities->page(); $this->setSettings(['app-disable-comments' => 'true']); + $this->asAdmin(); - $this->asAdmin()->visit($this->page->getUrl()) - ->pageNotHasElement('.comments-list'); + $resp = $this->asAdmin()->get($page->getUrl()); + $this->withHtml($resp)->assertElementNotExists('.comments-list'); } public function test_comment_enable() { - $this->asAdmin(); - + $page = $this->entities->page(); $this->setSettings(['app-disable-comments' => 'false']); + $this->asAdmin(); - $this->asAdmin()->visit($this->page->getUrl()) - ->pageHasElement('.comments-list'); + $resp = $this->asAdmin()->get($page->getUrl()); + $this->withHtml($resp)->assertElementExists('.comments-list'); } -} \ No newline at end of file +}