summaryrefslogtreecommitdiff
path: root/tests/units/Helper
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-09-19 20:45:36 -0400
committerFrederic Guillot <fred@kanboard.net>2016-09-19 20:45:36 -0400
commit91c1109b0562a5d6da15345fb5be44c57ca29076 (patch)
tree785595f823496a57fb16bf5f2e7bfe1cb0e1262a /tests/units/Helper
parentc328bcf840f2fe21e87246b10fb8c75dfa640d1d (diff)
Change column move restriction behavior
Diffstat (limited to 'tests/units/Helper')
-rw-r--r--tests/units/Helper/ProjectRoleHelperTest.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/units/Helper/ProjectRoleHelperTest.php b/tests/units/Helper/ProjectRoleHelperTest.php
index 4583d58e..eb9b320c 100644
--- a/tests/units/Helper/ProjectRoleHelperTest.php
+++ b/tests/units/Helper/ProjectRoleHelperTest.php
@@ -265,13 +265,21 @@ class ProjectRoleHelperTest extends Base
$this->assertEquals(1, $columnMoveRestrictionModel->create(1, 1, 2, 3));
$this->assertTrue($projectUserRole->addUser(1, 2, 'Custom Role'));
- $this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test', 'column_id' => 2)));
- $this->assertEquals(2, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test', 'column_id' => 3)));
+ $this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test', 'column_id' => 1)));
+ $this->assertEquals(2, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test', 'column_id' => 2)));
+ $this->assertEquals(3, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test', 'column_id' => 3)));
+ $this->assertEquals(4, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test', 'column_id' => 4)));
$task = $taskFinderModel->getById(1);
- $this->assertTrue($projectRoleHelper->isDraggable($task));
+ $this->assertFalse($projectRoleHelper->isDraggable($task));
$task = $taskFinderModel->getById(2);
+ $this->assertTrue($projectRoleHelper->isDraggable($task));
+
+ $task = $taskFinderModel->getById(3);
+ $this->assertTrue($projectRoleHelper->isDraggable($task));
+
+ $task = $taskFinderModel->getById(4);
$this->assertFalse($projectRoleHelper->isDraggable($task));
}