diff options
author | dalmond <david.almond@f-grp.com> | 2016-08-22 18:37:34 +0100 |
---|---|---|
committer | dalmond <david.almond@f-grp.com> | 2016-08-22 18:45:10 +0100 |
commit | 37425d45a621929bfa209f84f101ac8cd42b0d06 (patch) | |
tree | ddd70a704cdc58c05616af2ec607ab8f8e52ab65 /tests/units/Action/TaskAssignPrioritySwimlaneTest.php | |
parent | 25bdb03927007a20e6f518987508b39b9588fc97 (diff) |
Unit Test Issues Resolved
Diffstat (limited to 'tests/units/Action/TaskAssignPrioritySwimlaneTest.php')
-rw-r--r-- | tests/units/Action/TaskAssignPrioritySwimlaneTest.php | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/tests/units/Action/TaskAssignPrioritySwimlaneTest.php b/tests/units/Action/TaskAssignPrioritySwimlaneTest.php index 255d26e3..39c833bf 100644 --- a/tests/units/Action/TaskAssignPrioritySwimlaneTest.php +++ b/tests/units/Action/TaskAssignPrioritySwimlaneTest.php @@ -18,13 +18,17 @@ class TaskAssignPrioritySwimlaneTest extends Base $taskFinderModel = new TaskFinderModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'test1'))); - $this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test'))); + $this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test', 'priority' => 1))); + $task = $taskFinderModel->getById(1); + $this->assertNotEmpty($task); + $this->assertEquals(1, $task['priority']); + $event = new TaskEvent(array( 'task_id' => 1, 'task' => array( 'project_id' => 1, - 'priority' => 1, + 'swimlane_id' => 2, ) )); @@ -39,28 +43,4 @@ class TaskAssignPrioritySwimlaneTest extends Base $this->assertNotEmpty($task); $this->assertEquals(2, $task['priority']); } - - public function testWithWrongCategory() - { - $projectModel = new ProjectModel($this->container); - $taskCreationModel = new TaskCreationModel($this->container); - - $this->assertEquals(1, $projectModel->create(array('name' => 'test1'))); - $this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test'))); - - $event = new TaskEvent(array( - 'task_id' => 1, - 'task' => array( - 'project_id' => 1, - 'swimlane_id' => 3, - ) - )); - - $action = new TaskAssignColorColumn($this->container); - $action->setProjectId(1); - $action->setParam('priority', 2); - $action->setParam('swimlane_id', 2); - - $this->assertFalse($action->execute($event, TaskModel::EVENT_MOVE_SWIMLANE)); - } } |