summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-04-21 21:21:34 -0400
committerFrederic Guillot <fred@kanboard.net>2016-04-21 21:21:34 -0400
commit756716766cb33da2c25544918574368b51cca26e (patch)
tree5b4801f94cd89c75547caabcdcde618490600558 /tests
parent60e0753b90838120510861ebc674f826140b31de (diff)
Added priority field to API procedures
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/TaskTest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/integration/TaskTest.php b/tests/integration/TaskTest.php
index 6d500da4..39fe41bf 100644
--- a/tests/integration/TaskTest.php
+++ b/tests/integration/TaskTest.php
@@ -4,6 +4,22 @@ require_once __DIR__.'/Base.php';
class TaskTest extends Base
{
+ public function testPriorityAttribute()
+ {
+ $project_id = $this->app->createProject('My project');
+ $this->assertNotFalse($project_id);
+
+ $task_id = $this->app->createTask(array('project_id' => $project_id, 'title' => 'My task', 'priority' => 2));
+
+ $task = $this->app->getTask($task_id);
+ $this->assertEquals(2, $task['priority']);
+
+ $this->assertTrue($this->app->updateTask(array('id' => $task_id, 'project_id' => $project_id, 'priority' => 3)));
+
+ $task = $this->app->getTask($task_id);
+ $this->assertEquals(3, $task['priority']);
+ }
+
public function testChangeAssigneeToAssignableUser()
{
$project_id = $this->app->createProject('My project');