summaryrefslogtreecommitdiff
path: root/tests/units/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-06-24 11:40:58 -0400
committerFrederic Guillot <fred@kanboard.net>2016-06-24 11:40:58 -0400
commitb2e92480c29acb15586bc8ea305c8416927a667c (patch)
tree3a81aaac07b88a4af08795203e997b04d50a96c6 /tests/units/Model
parent700b4e8f0265e4eabd7a7c0eb6a06088d50554fe (diff)
Added filter class for tags
Diffstat (limited to 'tests/units/Model')
-rw-r--r--tests/units/Model/TaskTagModelTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/units/Model/TaskTagModelTest.php b/tests/units/Model/TaskTagModelTest.php
index 819f55b8..73bbeac1 100644
--- a/tests/units/Model/TaskTagModelTest.php
+++ b/tests/units/Model/TaskTagModelTest.php
@@ -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);
+ }
}