mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
add test for new setting
This commit is contained in:
parent
9b99712fce
commit
a6058705a4
@ -452,6 +452,7 @@ class ModelTest extends TestCase
|
|||||||
public function testCommentWithDisabledVizhash()
|
public function testCommentWithDisabledVizhash()
|
||||||
{
|
{
|
||||||
$options = parse_ini_file(CONF, true);
|
$options = parse_ini_file(CONF, true);
|
||||||
|
$options['main']['discussiondatedisplay'] = 'false';
|
||||||
$options['main']['icon'] = 'none';
|
$options['main']['icon'] = 'none';
|
||||||
$options['model'] = array(
|
$options['model'] = array(
|
||||||
'class' => 'Database',
|
'class' => 'Database',
|
||||||
@ -493,6 +494,10 @@ class ModelTest extends TestCase
|
|||||||
|
|
||||||
$comment = current($this->_model->getPaste(Helper::getPasteId())->get()['comments']);
|
$comment = current($this->_model->getPaste(Helper::getPasteId())->get()['comments']);
|
||||||
$this->assertFalse(array_key_exists('icon', $comment['meta']), 'icon was not generated');
|
$this->assertFalse(array_key_exists('icon', $comment['meta']), 'icon was not generated');
|
||||||
|
$this->assertTrue(array_key_exists('created', $comment['meta']), 'creation is set, when using default configuration');
|
||||||
|
|
||||||
|
$comment = current($paste->get()['comments']);
|
||||||
|
$this->assertFalse(array_key_exists('created', $comment['meta']), 'creation is not set, if using disabled configuration');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCommentVizhash()
|
public function testCommentVizhash()
|
||||||
|
Loading…
Reference in New Issue
Block a user