BookStack/tests/Entity/CommentSettingTest.php

28 lines
662 B
PHP
Raw Normal View History

<?php namespace Tests;
class CommentSettingTest extends BrowserKitTest {
protected $page;
2019-09-13 18:58:40 -04:00
public function setUp(): void {
parent::setUp();
$this->page = \BookStack\Entities\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');
}
}