From 5b888a23454e369ebf383c3003497038ae2fbf5d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 19 Aug 2015 21:25:19 -0400 Subject: Add search in task title when using an integer only input --- tests/units/TaskFilterTest.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/units') 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() -- cgit v1.2.3