From 91c1109b0562a5d6da15345fb5be44c57ca29076 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 19 Sep 2016 20:45:36 -0400 Subject: Change column move restriction behavior --- tests/units/Helper/ProjectRoleHelperTest.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tests/units/Helper') 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)); } -- cgit v1.2.3