summaryrefslogtreecommitdiff
path: root/tests/units/ActionTaskAssignColorTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-04-03 18:56:05 -0400
committerFrederic Guillot <fred@kanboard.net>2015-04-03 18:56:05 -0400
commita264a53e3b07d0669c1283d5c54c9b3919239449 (patch)
tree157b41ac99fe89874dabb0d4d7c25dac49f49430 /tests/units/ActionTaskAssignColorTest.php
parent5631210fb7e96c636b1322d5e3c9e7fd07e13fee (diff)
Rename action TaskAssignColor to TaskAssignColorColumn
Diffstat (limited to 'tests/units/ActionTaskAssignColorTest.php')
-rw-r--r--tests/units/ActionTaskAssignColorTest.php41
1 files changed, 0 insertions, 41 deletions
diff --git a/tests/units/ActionTaskAssignColorTest.php b/tests/units/ActionTaskAssignColorTest.php
deleted file mode 100644
index 4d2ea70a..00000000
--- a/tests/units/ActionTaskAssignColorTest.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-require_once __DIR__.'/Base.php';
-
-use Event\GenericEvent;
-use Model\Task;
-use Model\TaskCreation;
-use Model\TaskFinder;
-use Model\Project;
-
-class ActionTaskAssignColorTest extends Base
-{
- public function testColorChange()
- {
- $action = new Action\TaskAssignColor($this->container, 1, Task::EVENT_MOVE_COLUMN);
- $action->setParam('column_id', 2);
- $action->setParam('color_id', 'green');
-
- // We create a task in the first column
- $tc = new TaskCreation($this->container);
- $tf = new TaskFinder($this->container);
- $p = new Project($this->container);
-
- $this->assertEquals(1, $p->create(array('name' => 'test')));
- $this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 1, 'color_id' => 'yellow')));
-
- $event = array(
- 'project_id' => 1,
- 'task_id' => 1,
- 'column_id' => 2,
- 'color_id' => 'green',
- );
-
- // Our event should be executed
- $this->assertTrue($action->execute(new GenericEvent($event)));
-
- // Our task should have color green
- $task = $tf->getById(1);
- $this->assertEquals('green', $task['color_id']);
- }
-}