summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-14 17:03:55 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-14 17:03:55 -0400
commit17a3781bd8c03e6b653104dbcb996a1ff1213959 (patch)
tree8cf5de301e55f62465d19f270109c6c7c49cc5ce /tests
parentc6a4fbb3864d63a69a0b42d17f5c3037a73da961 (diff)
Add Gantt chart for projects
Diffstat (limited to 'tests')
-rw-r--r--tests/units/TaskCreationTest.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/units/TaskCreationTest.php b/tests/units/TaskCreationTest.php
index 2dc67ad4..a77778d6 100644
--- a/tests/units/TaskCreationTest.php
+++ b/tests/units/TaskCreationTest.php
@@ -289,20 +289,21 @@ class TaskCreationTest extends Base
$this->assertEquals(1, $p->create(array('name' => 'test')));
$this->assertEquals(1, $tc->create(array('project_id' => 1, 'title' => 'test', 'date_due' => $date)));
$this->assertEquals(2, $tc->create(array('project_id' => 1, 'title' => 'test', 'date_due' => $timestamp)));
+ $this->assertEquals(3, $tc->create(array('project_id' => 1, 'title' => 'test', 'date_due' => '')));
$task = $tf->getById(1);
$this->assertNotEmpty($task);
- $this->assertNotFalse($task);
-
$this->assertEquals(1, $task['id']);
$this->assertEquals($date, date('Y-m-d', $task['date_due']));
$task = $tf->getById(2);
$this->assertNotEmpty($task);
- $this->assertNotFalse($task);
-
$this->assertEquals(2, $task['id']);
$this->assertEquals($timestamp, $task['date_due']);
+
+ $task = $tf->getById(3);
+ $this->assertEquals(3, $task['id']);
+ $this->assertEquals(0, $task['date_due']);
}
public function testDateStarted()
@@ -336,6 +337,11 @@ class TaskCreationTest extends Base
$task = $tf->getById(4);
$this->assertEquals(time(), $task['date_started'], '', 1);
+
+ // Set empty string
+ $this->assertEquals(5, $tc->create(array('project_id' => 1, 'title' => 'test', 'date_started' => '')));
+ $task = $tf->getById(5);
+ $this->assertEquals(0, $task['date_started']);
}
public function testTime()