Do not show duplicated results when multiple comments match
This commit is contained in:
committed by
fguillot
parent
702379a550
commit
d5f6317608
@@ -21,8 +21,10 @@ class TaskCommentFilterTest extends Base
|
||||
$this->assertEquals(1, $projectModel->create(array('name' => 'Test')));
|
||||
$this->assertEquals(1, $taskCreation->create(array('title' => 'Test', 'project_id' => 1)));
|
||||
$this->assertEquals(1, $commentModel->create(array('task_id' => 1, 'user_id' => 1, 'comment' => 'This is a test')));
|
||||
$this->assertEquals(2, $commentModel->create(array('task_id' => 1, 'user_id' => 1, 'comment' => 'This is another test')));
|
||||
|
||||
$filter = new TaskCommentFilter();
|
||||
$filter->setDatabase($this->container['db']);
|
||||
$filter->withQuery($query);
|
||||
$filter->withValue('test');
|
||||
$filter->apply();
|
||||
@@ -43,6 +45,7 @@ class TaskCommentFilterTest extends Base
|
||||
$this->assertEquals(1, $commentModel->create(array('task_id' => 1, 'user_id' => 1, 'comment' => 'This is a test')));
|
||||
|
||||
$filter = new TaskCommentFilter();
|
||||
$filter->setDatabase($this->container['db']);
|
||||
$filter->withQuery($query);
|
||||
$filter->withValue('foobar');
|
||||
$filter->apply();
|
||||
|
||||
Reference in New Issue
Block a user