mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-05 07:23:59 +08:00
28 lines
647 B
PHP
28 lines
647 B
PHP
<?php namespace Tests;
|
|
|
|
class CommentSettingTest extends BrowserKitTest {
|
|
protected $page;
|
|
|
|
public function setUp() {
|
|
parent::setUp();
|
|
$this->page = \BookStack\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');
|
|
}
|
|
} |