summaryrefslogtreecommitdiff
path: root/tests/units/TaskFilterTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-19 21:25:19 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-19 21:25:19 -0400
commit5b888a23454e369ebf383c3003497038ae2fbf5d (patch)
treee3e1c5f722eb36e3c39d654e41ac4ee082f715b8 /tests/units/TaskFilterTest.php
parent1983fc5f7afa20b5ddba0ad1fb63fb92f563deb6 (diff)
Add search in task title when using an integer only input
Diffstat (limited to 'tests/units/TaskFilterTest.php')
-rw-r--r--tests/units/TaskFilterTest.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/units/TaskFilterTest.php b/tests/units/TaskFilterTest.php
index 504aa5c2..80d5ee4c 100644
--- a/tests/units/TaskFilterTest.php
+++ b/tests/units/TaskFilterTest.php
@@ -107,6 +107,7 @@ class TaskFilterTest extends Base
$this->assertEquals(1, $p->create(array('name' => 'test')));
$this->assertNotFalse($tc->create(array('project_id' => 1, 'title' => 'task1')));
$this->assertNotFalse($tc->create(array('project_id' => 1, 'title' => 'task2')));
+ $this->assertNotFalse($tc->create(array('project_id' => 1, 'title' => 'task 43')));
$tf->search('#2');
$tasks = $tf->findAll();
@@ -137,6 +138,12 @@ class TaskFilterTest extends Base
$this->assertNotEmpty($tasks);
$this->assertCount(1, $tasks);
$this->assertEquals('task1', $tasks[0]['title']);
+
+ $tf->search('43');
+ $tasks = $tf->findAll();
+ $this->assertNotEmpty($tasks);
+ $this->assertCount(1, $tasks);
+ $this->assertEquals('task 43', $tasks[0]['title']);
}
public function testSearchWithReference()