summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-04-29 17:44:06 -0400
committerFrederic Guillot <fred@kanboard.net>2016-04-29 17:44:06 -0400
commita34f83fb3044b51a8cb519a97ad27853ef4a068a (patch)
treefc32f9f7493c38c0a64efd94bb3ae331f491a62d /tests
parentfc8f8748b9f89167ca9e6f4670bbc5e032e068b7 (diff)
Fix bug: closing all tasks by column, also update closed tasks
Diffstat (limited to 'tests')
-rw-r--r--tests/units/Model/TaskStatusTest.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/units/Model/TaskStatusTest.php b/tests/units/Model/TaskStatusTest.php
index 86f31d70..aa48be5e 100644
--- a/tests/units/Model/TaskStatusTest.php
+++ b/tests/units/Model/TaskStatusTest.php
@@ -26,6 +26,9 @@ class TaskStatusTest extends Base
$this->assertEquals(2, $tc->create(array('title' => 'test', 'project_id' => 1)));
$this->assertEquals(3, $tc->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 2)));
$this->assertEquals(4, $tc->create(array('title' => 'test', 'project_id' => 1, 'swimlane_id' => 1)));
+ $this->assertEquals(5, $tc->create(array('title' => 'test', 'project_id' => 1, 'is_active' => 0, 'date_completed' => strtotime('2015-01-01'))));
+
+ $taskBefore = $tf->getById(5);
$this->assertEquals(2, $tf->countByColumnAndSwimlaneId(1, 1, 0));
$this->assertEquals(1, $tf->countByColumnAndSwimlaneId(1, 1, 1));
@@ -45,6 +48,10 @@ class TaskStatusTest extends Base
$this->assertEquals(0, $tf->countByColumnAndSwimlaneId(1, 1, 0));
$this->assertEquals(0, $tf->countByColumnAndSwimlaneId(1, 1, 1));
$this->assertEquals(0, $tf->countByColumnAndSwimlaneId(1, 2, 0));
+
+ $taskAfter = $tf->getById(5);
+ $this->assertEquals(strtotime('2015-01-01'), $taskAfter['date_completed']);
+ $this->assertEquals($taskBefore['date_modification'], $taskAfter['date_modification']);
}
public function testStatus()