]> BookStack Code Mirror - bookstack/blob - tests/Entity/CommentSettingTest.php
Merge branch 'laravel-upgrade'
[bookstack] / tests / Entity / CommentSettingTest.php
1 <?php namespace Tests;
2
3 class CommentSettingTest extends BrowserKitTest {
4   protected $page;
5
6   public function setUp(): void {
7       parent::setUp();
8       $this->page = \BookStack\Entities\Page::first();
9   }
10
11   public function test_comment_disable () {
12     $this->asAdmin();
13
14     $this->setSettings(['app-disable-comments' => 'true']);
15
16     $this->asAdmin()->visit($this->page->getUrl())
17     ->pageNotHasElement('.comments-list');
18   }
19
20   public function test_comment_enable () {
21     $this->asAdmin();
22
23     $this->setSettings(['app-disable-comments' => 'false']);
24
25     $this->asAdmin()->visit($this->page->getUrl())
26     ->pageHasElement('.comments-list');
27   }
28 }