summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-12-18 18:19:25 -0500
committerFrederic Guillot <fred@kanboard.net>2016-12-18 18:19:25 -0500
commit2decbe28b513da9873a744c3da81caf9d710530f (patch)
treeba7a3b9c11d45ed3b50319d320ff267dcef93acd /tests/integration
parentbc5641da8b7fb6be3127ecbe5f64a55ed1342649 (diff)
Add tags parameter to task API calls
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/TaskTagProcedureTest.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/integration/TaskTagProcedureTest.php b/tests/integration/TaskTagProcedureTest.php
index ae6139d3..4b820c9a 100644
--- a/tests/integration/TaskTagProcedureTest.php
+++ b/tests/integration/TaskTagProcedureTest.php
@@ -12,6 +12,8 @@ class TaskTagProcedureTest extends BaseProcedureTest
$this->assertCreateTask();
$this->assertSetTaskTags();
$this->assertGetTaskTags();
+ $this->assertCreateTaskWithTags();
+ $this->assertUpdateTaskWithTags();
}
public function assertSetTaskTags()
@@ -24,4 +26,29 @@ class TaskTagProcedureTest extends BaseProcedureTest
$tags = $this->app->getTaskTags($this->taskId);
$this->assertEquals(array('tag1', 'tag2'), array_values($tags));
}
+
+ public function assertCreateTaskWithTags()
+ {
+ $this->taskId = $this->app->createTask(array(
+ 'title' => $this->taskTitle,
+ 'project_id' => $this->projectId,
+ 'tags' => array('tag A', 'tag B'),
+ ));
+
+ $this->assertNotFalse($this->taskId);
+
+ $tags = $this->app->getTaskTags($this->taskId);
+ $this->assertEquals(array('tag A', 'tag B'), array_values($tags));
+ }
+
+ public function assertUpdateTaskWithTags()
+ {
+ $this->assertTrue($this->app->updateTask(array(
+ 'id' => $this->taskId,
+ 'tags' => array('tag C'),
+ )));
+
+ $tags = $this->app->getTaskTags($this->taskId);
+ $this->assertEquals(array('tag C'), array_values($tags));
+ }
}