summaryrefslogtreecommitdiff
path: root/tests/units/TaskTest.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-09 15:15:04 +0200
committerFrédéric Guillot <fred@kanboard.net>2014-09-09 15:15:04 +0200
commitef95c7c28479a22e41fff35a893f05eb084e1f2c (patch)
tree0ad91fa529ef4fc86be8df106c54ba4ff8053ea1 /tests/units/TaskTest.php
parent685d1cc44cea32c6dbab95d05c882aa808bcab44 (diff)
Improve project api procedures
Diffstat (limited to 'tests/units/TaskTest.php')
-rw-r--r--tests/units/TaskTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/units/TaskTest.php b/tests/units/TaskTest.php
index 3d1a5e49..c9468efd 100644
--- a/tests/units/TaskTest.php
+++ b/tests/units/TaskTest.php
@@ -35,6 +35,18 @@ class TaskTest extends Base
$this->assertEquals(time(), $task['date_modification']);
}
+ public function testRemove()
+ {
+ $t = new Task($this->registry);
+ $p = new Project($this->registry);
+
+ $this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
+ $this->assertEquals(1, $t->create(array('title' => 'Task #1', 'project_id' => 1)));
+
+ $this->assertTrue($t->remove(1));
+ $this->assertFalse($t->remove(1234));
+ }
+
public function testMoveTaskWithBadPreviousPosition()
{
$t = new Task($this->registry);