mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-29 23:22:34 +01:00
Adding testcases for comments disable / enable setting.
This commit is contained in:
parent
7a5bd23909
commit
6a54733f2b
28
tests/Entity/CommentSettingTest.php
Normal file
28
tests/Entity/CommentSettingTest.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user