1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-30 15:42:41 +01:00
BookStack/tests/Entity/CommentSettingTest.php
2021-06-26 15:23:15 +00:00

36 lines
783 B
PHP

<?php
namespace Tests\Entity;
use BookStack\Entities\Models\Page;
use Tests\TestCase;
class CommentSettingTest extends TestCase
{
protected $page;
public function setUp(): void
{
parent::setUp();
$this->page = Page::query()->first();
}
public function test_comment_disable()
{
$this->setSettings(['app-disable-comments' => 'true']);
$this->asAdmin();
$this->asAdmin()->get($this->page->getUrl())
->assertElementNotExists('.comments-list');
}
public function test_comment_enable()
{
$this->setSettings(['app-disable-comments' => 'false']);
$this->asAdmin();
$this->asAdmin()->get($this->page->getUrl())
->assertElementExists('.comments-list');
}
}