From 756716766cb33da2c25544918574368b51cca26e Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 21 Apr 2016 21:21:34 -0400 Subject: Added priority field to API procedures --- tests/integration/TaskTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests') 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'); -- cgit v1.2.3