diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-09 15:15:04 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-09 15:15:04 +0200 |
commit | ef95c7c28479a22e41fff35a893f05eb084e1f2c (patch) | |
tree | 0ad91fa529ef4fc86be8df106c54ba4ff8053ea1 /tests/units/TaskTest.php | |
parent | 685d1cc44cea32c6dbab95d05c882aa808bcab44 (diff) |
Improve project api procedures
Diffstat (limited to 'tests/units/TaskTest.php')
-rw-r--r-- | tests/units/TaskTest.php | 12 |
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); |