Added filter class for tags

This commit is contained in:
Frederic Guillot
2016-06-24 11:40:58 -04:00
parent 700b4e8f02
commit b2e92480c2
8 changed files with 243 additions and 12 deletions

View File

@@ -110,4 +110,18 @@ class TaskTagModelTest extends Base
$this->assertEquals($expected, $tags);
}
public function testGetTagsForTasksWithEmptyList()
{
$projectModel = new ProjectModel($this->container);
$taskCreationModel = new TaskCreationModel($this->container);
$taskTagModel = new TaskTagModel($this->container);
$this->assertEquals(1, $projectModel->create(array('name' => 'Test')));
$this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test1')));
$this->assertTrue($taskTagModel->save(1, 1, array('My tag 1', 'My tag 2', 'My tag 3')));
$tags = $taskTagModel->getTagsByTasks(array());
$this->assertEquals(array(), $tags);
}
}