X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/3068/head:/tests/Entity/CommentSettingTest.php diff --git a/tests/Entity/CommentSettingTest.php b/tests/Entity/CommentSettingTest.php index 49ceede9f..23607f5a7 100644 --- a/tests/Entity/CommentSettingTest.php +++ b/tests/Entity/CommentSettingTest.php @@ -1,35 +1,35 @@ -page = Page::first(); + $this->page = Page::query()->first(); } public function test_comment_disable() { - $this->asAdmin(); - $this->setSettings(['app-disable-comments' => 'true']); + $this->asAdmin(); - $this->asAdmin()->visit($this->page->getUrl()) - ->pageNotHasElement('.comments-list'); + $this->asAdmin()->get($this->page->getUrl()) + ->assertElementNotExists('.comments-list'); } public function test_comment_enable() { - $this->asAdmin(); - $this->setSettings(['app-disable-comments' => 'false']); + $this->asAdmin(); - $this->asAdmin()->visit($this->page->getUrl()) - ->pageHasElement('.comments-list'); + $this->asAdmin()->get($this->page->getUrl()) + ->assertElementExists('.comments-list'); } -} \ No newline at end of file +}