From ef95c7c28479a22e41fff35a893f05eb084e1f2c Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Tue, 9 Sep 2014 15:15:04 +0200 Subject: Improve project api procedures --- tests/units/TaskTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/units/TaskTest.php') 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); -- cgit v1.2.3