summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/TaskTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/integration/TaskTest.php b/tests/integration/TaskTest.php
index 39fe41bf..0c398761 100644
--- a/tests/integration/TaskTest.php
+++ b/tests/integration/TaskTest.php
@@ -4,6 +4,26 @@ require_once __DIR__.'/Base.php';
class TaskTest extends Base
{
+ public function testSearchTasks()
+ {
+ $project_id1 = $this->app->createProject('My project');
+ $project_id2 = $this->app->createProject('My project');
+ $this->assertNotFalse($project_id1);
+ $this->assertNotFalse($project_id2);
+
+ $this->assertNotFalse($this->app->createTask(array('project_id' => $project_id1, 'title' => 'T1')));
+ $this->assertNotFalse($this->app->createTask(array('project_id' => $project_id1, 'title' => 'T2')));
+ $this->assertNotFalse($this->app->createTask(array('project_id' => $project_id2, 'title' => 'T3')));
+
+ $tasks = $this->app->searchTasks($project_id1, 't2');
+ $this->assertCount(1, $tasks);
+ $this->assertEquals('T2', $tasks[0]['title']);
+
+ $tasks = $this->app->searchTasks(array('project_id' => $project_id2, 'query' => 'assignee:nobody'));
+ $this->assertCount(1, $tasks);
+ $this->assertEquals('T3', $tasks[0]['title']);
+ }
+
public function testPriorityAttribute()
{
$project_id = $this->app->createProject('My project');