fix item comment open test

This commit is contained in:
Jacson Passold 2018-08-28 00:19:55 -03:00
parent eacd65d68d
commit add549b881
1 changed files with 4 additions and 4 deletions

View File

@ -279,7 +279,7 @@ class Items extends TAINACAN_UnitTestCase {
'collection', 'collection',
array( array(
'name' => 'collectionComments', 'name' => 'collectionComments',
'comment_status' => 'closed' 'allow_comments' => 'closed'
), ),
true, true,
true true
@ -303,8 +303,8 @@ class Items extends TAINACAN_UnitTestCase {
$this->assertFalse(comments_open($item->get_id())); $this->assertFalse(comments_open($item->get_id()));
$collections = \Tainacan\Repositories\Collections::get_instance(); $collections = \Tainacan\Repositories\Collections::get_instance();
$collection->set('comment_status', 'open'); $collection->set('allow_comments', 'open');
$collection->validate(); $this->assertTrue($collection->validate());
$collections->update($collection); $collections->update($collection);
$this->assertTrue(comments_open($item->get_id())); $this->assertTrue(comments_open($item->get_id()));
@ -312,7 +312,7 @@ class Items extends TAINACAN_UnitTestCase {
$items = \Tainacan\Repositories\Items::get_instance(); $items = \Tainacan\Repositories\Items::get_instance();
$item->set('comment_status', 'closed'); $item->set('comment_status', 'closed');
$item->validate(); $this->assertTrue($item->validate());
$items->update($item); $items->update($item);
$this->assertFalse(comments_open($item->get_id())); $this->assertFalse(comments_open($item->get_id()));