3 namespace Tests\Entity;
5 use BookStack\Entities\Models\Page;
8 class CommentSettingTest extends TestCase
12 protected function setUp(): void
15 $this->page = Page::query()->first();
18 public function test_comment_disable()
20 $this->setSettings(['app-disable-comments' => 'true']);
23 $resp = $this->asAdmin()->get($this->page->getUrl());
24 $this->withHtml($resp)->assertElementNotExists('.comments-list');
27 public function test_comment_enable()
29 $this->setSettings(['app-disable-comments' => 'false']);
32 $resp = $this->asAdmin()->get($this->page->getUrl());
33 $this->withHtml($resp)->assertElementExists('.comments-list');