]> BookStack Code Mirror - bookstack/blob - tests/Entity/CommentSettingTest.php
Adding Croatian translation files
[bookstack] / tests / Entity / CommentSettingTest.php
1 <?php namespace Tests\Entity;
2
3 use BookStack\Entities\Models\Page;
4 use Tests\TestCase;
5
6 class CommentSettingTest extends TestCase
7 {
8     protected $page;
9
10     public function setUp(): void
11     {
12         parent::setUp();
13         $this->page = Page::query()->first();
14     }
15
16     public function test_comment_disable()
17     {
18         $this->setSettings(['app-disable-comments' => 'true']);
19         $this->asAdmin();
20
21         $this->asAdmin()->get($this->page->getUrl())
22             ->assertElementNotExists('.comments-list');
23     }
24
25     public function test_comment_enable()
26     {
27         $this->setSettings(['app-disable-comments' => 'false']);
28         $this->asAdmin();
29
30         $this->asAdmin()->get($this->page->getUrl())
31             ->assertElementExists('.comments-list');
32     }
33 }