Add more tests
This commit is contained in:
@@ -10,7 +10,6 @@ class ActionTaskAssignColorUser extends Base
|
||||
public function testBadProject()
|
||||
{
|
||||
$action = new Action\TaskAssignColorUser(3, new Task($this->db, $this->event));
|
||||
$action->setParam('column_id', 5);
|
||||
|
||||
$event = array(
|
||||
'project_id' => 2,
|
||||
@@ -22,24 +21,9 @@ class ActionTaskAssignColorUser extends Base
|
||||
$this->assertFalse($action->execute($event));
|
||||
}
|
||||
|
||||
public function testBadColumn()
|
||||
{
|
||||
$action = new Action\TaskAssignColorUser(3, new Task($this->db, $this->event));
|
||||
$action->setParam('column_id', 5);
|
||||
|
||||
$event = array(
|
||||
'project_id' => 3,
|
||||
'task_id' => 3,
|
||||
'column_id' => 3,
|
||||
);
|
||||
|
||||
$this->assertFalse($action->execute($event));
|
||||
}
|
||||
|
||||
public function testExecute()
|
||||
{
|
||||
$action = new Action\TaskAssignColorUser(1, new Task($this->db, $this->event));
|
||||
$action->setParam('column_id', 2);
|
||||
$action->setParam('user_id', 1);
|
||||
$action->setParam('color_id', 'blue');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user