forked from BookStackApp/BookStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommentSettingTest.php
More file actions
35 lines (27 loc) · 840 Bytes
/
Copy pathCommentSettingTest.php
File metadata and controls
35 lines (27 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace Tests\Entity;
use BookStack\Entities\Models\Page;
use Tests\TestCase;
class CommentSettingTest extends TestCase
{
protected $page;
protected function setUp(): void
{
parent::setUp();
$this->page = Page::query()->first();
}
public function test_comment_disable()
{
$this->setSettings(['app-disable-comments' => 'true']);
$this->asAdmin();
$resp = $this->asAdmin()->get($this->page->getUrl());
$this->withHtml($resp)->assertElementNotExists('.comments-list');
}
public function test_comment_enable()
{
$this->setSettings(['app-disable-comments' => 'false']);
$this->asAdmin();
$resp = $this->asAdmin()->get($this->page->getUrl());
$this->withHtml($resp)->assertElementExists('.comments-list');
}
}