Improve project api procedures

This commit is contained in:
Frédéric Guillot
2014-09-09 15:15:04 +02:00
parent 685d1cc44c
commit ef95c7c284
8 changed files with 438 additions and 20 deletions

View File

@@ -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);