1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-19 10:42:29 +03:00
Files
bookstack/tests/Activity/CommentSettingTest.php

29 lines
727 B
PHP

<?php
namespace Activity;
use Tests\TestCase;
class CommentSettingTest extends TestCase
{
public function test_comment_disable()
{
$page = $this->entities->page();
$this->setSettings(['app-disable-comments' => 'true']);
$this->asAdmin();
$resp = $this->asAdmin()->get($page->getUrl());
$this->withHtml($resp)->assertElementNotExists('.comments-list');
}
public function test_comment_enable()
{
$page = $this->entities->page();
$this->setSettings(['app-disable-comments' => 'false']);
$this->asAdmin();
$resp = $this->asAdmin()->get($page->getUrl());
$this->withHtml($resp)->assertElementExists('.comments-list');
}
}