X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/f413fc528a8136c2ad8d33a57b3615fa22e55e93..refs/pull/5280/head:/tests/Entity/CommentSettingTest.php diff --git a/tests/Entity/CommentSettingTest.php b/tests/Entity/CommentSettingTest.php index 967e550a7..7de457441 100644 --- a/tests/Entity/CommentSettingTest.php +++ b/tests/Entity/CommentSettingTest.php @@ -1,28 +1,28 @@ -page = \BookStack\Entities\Page::first(); - } - - public function test_comment_disable () { - $this->asAdmin(); - - $this->setSettings(['app-disable-comments' => 'true']); - - $this->asAdmin()->visit($this->page->getUrl()) - ->pageNotHasElement('.comments-list'); - } - - public function test_comment_enable () { - $this->asAdmin(); - - $this->setSettings(['app-disable-comments' => 'false']); - - $this->asAdmin()->visit($this->page->getUrl()) - ->pageHasElement('.comments-list'); - } -} \ No newline at end of file +entities->page(); + $this->setSettings(['app-disable-comments' => 'true']); + $this->asAdmin(); + + $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($page->getUrl()); + $this->withHtml($resp)->assertElementExists('.comments-list'); + } +}