summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-01 18:28:32 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-01 18:28:32 -0400
commit31f3de9646e4e54db431be6a6751e931be43d995 (patch)
tree389cd7f69aaf7563389b6e4793a1dd6bb3a57e06 /tests/units
parent109a2a2e25e0e170d3df3860d054f82f70e78c4d (diff)
Add global search section
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/TaskFilterTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/units/TaskFilterTest.php b/tests/units/TaskFilterTest.php
index cec30394..33e1792e 100644
--- a/tests/units/TaskFilterTest.php
+++ b/tests/units/TaskFilterTest.php
@@ -94,25 +94,30 @@ class TaskFilterTest extends Base
$this->assertNotEmpty($tasks);
$this->assertCount(1, $tasks);
$this->assertEquals('task2', $tasks[0]['title']);
+ $this->assertEquals('Feature request', $tasks[0]['category_name']);
$tf->search('category:"hé hé"');
$tasks = $tf->findAll();
$this->assertNotEmpty($tasks);
$this->assertCount(1, $tasks);
$this->assertEquals('task3', $tasks[0]['title']);
+ $this->assertEquals('hé hé', $tasks[0]['category_name']);
$tf->search('category:"Feature request" category:"hé hé"');
$tasks = $tf->findAll();
$this->assertNotEmpty($tasks);
$this->assertCount(2, $tasks);
$this->assertEquals('task2', $tasks[0]['title']);
+ $this->assertEquals('Feature request', $tasks[0]['category_name']);
$this->assertEquals('task3', $tasks[1]['title']);
+ $this->assertEquals('hé hé', $tasks[1]['category_name']);
$tf->search('category:none');
$tasks = $tf->findAll();
$this->assertNotEmpty($tasks);
$this->assertCount(1, $tasks);
$this->assertEquals('task1', $tasks[0]['title']);
+ $this->assertEquals('', $tasks[0]['category_name']);
$tf->search('category:"not found"');
$tasks = $tf->findAll();