summaryrefslogtreecommitdiff
path: root/tests/units/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-07 19:01:08 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-07 19:01:08 -0400
commit4785174e43d61b20e9248c8bfe9b5b50c61a5ae6 (patch)
treef72a8a3a27401a6b074c92a7457d324962bfdc61 /tests/units/Model
parent6dba53317c202c56ba60cf490084630de42b939c (diff)
Duplicate a project with tasks will copy the new tasks in the same columns
Diffstat (limited to 'tests/units/Model')
-rw-r--r--tests/units/Model/TaskDuplicationTest.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/units/Model/TaskDuplicationTest.php b/tests/units/Model/TaskDuplicationTest.php
index 56718841..f79bc9f4 100644
--- a/tests/units/Model/TaskDuplicationTest.php
+++ b/tests/units/Model/TaskDuplicationTest.php
@@ -133,7 +133,7 @@ class TaskDuplicationTest extends Base
$this->assertEquals(1, $task['owner_id']);
$this->assertEquals(0, $task['category_id']);
$this->assertEquals(0, $task['swimlane_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
$this->assertEquals(1, $task['position']);
$this->assertEquals(2, $task['project_id']);
$this->assertEquals('test', $task['title']);
@@ -168,7 +168,7 @@ class TaskDuplicationTest extends Base
$this->assertEquals(0, $task['owner_id']);
$this->assertEquals(2, $task['category_id']);
$this->assertEquals(0, $task['swimlane_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
$this->assertEquals(1, $task['position']);
$this->assertEquals(2, $task['project_id']);
$this->assertEquals('test', $task['title']);
@@ -240,7 +240,7 @@ class TaskDuplicationTest extends Base
$this->assertEquals(0, $task['owner_id']);
$this->assertEquals(0, $task['category_id']);
$this->assertEquals(2, $task['swimlane_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
$this->assertEquals(1, $task['position']);
$this->assertEquals(2, $task['project_id']);
$this->assertEquals('test', $task['title']);
@@ -273,7 +273,7 @@ class TaskDuplicationTest extends Base
$this->assertEquals(0, $task['owner_id']);
$this->assertEquals(0, $task['category_id']);
$this->assertEquals(0, $task['swimlane_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
$this->assertEquals(1, $task['position']);
$this->assertEquals(2, $task['project_id']);
$this->assertEquals('test', $task['title']);
@@ -352,7 +352,7 @@ class TaskDuplicationTest extends Base
$task = $tf->getById(2);
$this->assertNotEmpty($task);
$this->assertEquals(0, $task['owner_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
$this->assertEquals(1, $task['position']);
$this->assertEquals(2, $task['project_id']);
$this->assertEquals('test', $task['title']);
@@ -372,6 +372,7 @@ class TaskDuplicationTest extends Base
$task = $tf->getById(3);
$this->assertNotEmpty($task);
$this->assertEquals(2, $task['position']);
+ $this->assertEquals(6, $task['column_id']);
$this->assertEquals(2, $task['owner_id']);
$this->assertEquals(2, $task['project_id']);
@@ -381,7 +382,7 @@ class TaskDuplicationTest extends Base
$task = $tf->getById(5);
$this->assertNotEmpty($task);
- $this->assertEquals(3, $task['position']);
+ $this->assertEquals(1, $task['position']);
$this->assertEquals(0, $task['owner_id']);
$this->assertEquals(2, $task['project_id']);
$this->assertEquals(5, $task['column_id']);
@@ -486,7 +487,7 @@ class TaskDuplicationTest extends Base
$this->assertEquals(0, $task['owner_id']);
$this->assertEquals(2, $task['category_id']);
$this->assertEquals(0, $task['swimlane_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
$this->assertEquals(1, $task['position']);
$this->assertEquals(2, $task['project_id']);
$this->assertEquals('test', $task['title']);
@@ -524,7 +525,7 @@ class TaskDuplicationTest extends Base
$this->assertEquals(1, $task['position']);
$this->assertEquals(2, $task['owner_id']);
$this->assertEquals(2, $task['project_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
}
public function testMoveAnotherProjectWithForbiddenUser()
@@ -559,7 +560,7 @@ class TaskDuplicationTest extends Base
$this->assertEquals(1, $task['position']);
$this->assertEquals(0, $task['owner_id']);
$this->assertEquals(2, $task['project_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
}
public function testMoveAnotherProjectWithSwimlane()
@@ -589,7 +590,7 @@ class TaskDuplicationTest extends Base
$this->assertEquals(0, $task['owner_id']);
$this->assertEquals(0, $task['category_id']);
$this->assertEquals(2, $task['swimlane_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
$this->assertEquals(1, $task['position']);
$this->assertEquals(2, $task['project_id']);
$this->assertEquals('test', $task['title']);
@@ -622,7 +623,7 @@ class TaskDuplicationTest extends Base
$this->assertEquals(0, $task['owner_id']);
$this->assertEquals(0, $task['category_id']);
$this->assertEquals(0, $task['swimlane_id']);
- $this->assertEquals(5, $task['column_id']);
+ $this->assertEquals(6, $task['column_id']);
$this->assertEquals(1, $task['position']);
$this->assertEquals(2, $task['project_id']);
$this->assertEquals('test', $task['title']);