BookStack/tests/Entity/CommentSettingTest.php
Dan Brown ef1b98019a
Fixed some mis-refactoring and split search service
Search service broken into index and runner tools.
2020-11-22 00:17:45 +00:00

35 lines
780 B
PHP

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