Skip to content

Commit

Permalink
Fixed state tests
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh4 committed Dec 17, 2020
1 parent 5ea33d3 commit d8ca4b4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/codeception/unit/TaskStateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@

namespace humhub\modules\tasks\tests\codeception\unit;

use humhub\libs\BasePermission;
use humhub\modules\space\models\Space;
use humhub\modules\tasks\models\state\CompletedState;
use humhub\modules\tasks\models\state\InProgressState;
use humhub\modules\tasks\models\state\PendingReviewState;
use humhub\modules\tasks\models\state\PendingState;
use humhub\modules\tasks\models\Task;
use humhub\modules\tasks\permissions\ManageTasks;
use humhub\modules\user\models\User;
use tasks\TaskTestCase;


class TaskStateTest extends TaskTestCase
{
public function _before()
{
parent::_before();
$space4 = Space::findOne(4);
$this->setContentContainerPermission($space4,Space::USERGROUP_ADMIN,ManageTasks::class, BasePermission::STATE_DENY);
$this->setContentContainerPermission($space4,Space::USERGROUP_MODERATOR,ManageTasks::class, BasePermission::STATE_DENY);
}

public function testResetTask()
{
$this->becomeUser('User1');
Expand All @@ -33,6 +43,7 @@ public function testResetTask()

public function testReviewRevertStateProcess()
{

$user1 = User::findOne(2);
$user2 = User::findOne(3);
$this->becomeUser('User2');
Expand Down

0 comments on commit d8ca4b4

Please sign in to comment.