summaryrefslogtreecommitdiff
path: root/tests/integration/TaskTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-06-26 10:25:13 -0400
committerFrederic Guillot <fred@kanboard.net>2016-06-26 10:25:13 -0400
commit4a230d331ec220fc32a48525afb308af0d9787fa (patch)
tree514aa3d703155b7f97a2c77147c9fd74cef60f84 /tests/integration/TaskTest.php
parent922e0fb6de06a98774418612e0b0f75af72b6dbb (diff)
Added application and project roles validation for API procedure calls
Diffstat (limited to 'tests/integration/TaskTest.php')
-rw-r--r--tests/integration/TaskTest.php55
1 files changed, 0 insertions, 55 deletions
diff --git a/tests/integration/TaskTest.php b/tests/integration/TaskTest.php
deleted file mode 100644
index 6f1d9d62..00000000
--- a/tests/integration/TaskTest.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-require_once __DIR__.'/BaseIntegrationTest.php';
-
-class TaskTest extends BaseIntegrationTest
-{
- protected $projectName = 'My project to test tasks';
-
- public function testAll()
- {
- $this->assertCreateTeamProject();
- $this->assertCreateTask();
- $this->assertUpdateTask();
- $this->assertGetTaskById();
- $this->assertGetTaskByReference();
- $this->assertGetAllTasks();
- $this->assertOpenCloseTask();
- }
-
- public function assertUpdateTask()
- {
- $this->assertTrue($this->app->updateTask(array('id' => $this->taskId, 'color_id' => 'red')));
- }
-
- public function assertGetTaskById()
- {
- $task = $this->app->getTask($this->taskId);
- $this->assertNotNull($task);
- $this->assertEquals('red', $task['color_id']);
- $this->assertEquals($this->taskTitle, $task['title']);
- }
-
- public function assertGetTaskByReference()
- {
- $taskId = $this->app->createTask(array('title' => 'task with reference', 'project_id' => $this->projectId, 'reference' => 'test'));
- $this->assertNotFalse($taskId);
-
- $task = $this->app->getTaskByReference($this->projectId, 'test');
- $this->assertNotNull($task);
- $this->assertEquals($taskId, $task['id']);
- }
-
- public function assertGetAllTasks()
- {
- $tasks = $this->app->getAllTasks($this->projectId);
- $this->assertInternalType('array', $tasks);
- $this->assertNotEmpty($tasks);
- }
-
- public function assertOpenCloseTask()
- {
- $this->assertTrue($this->app->closeTask($this->taskId));
- $this->assertTrue($this->app->openTask($this->taskId));
- }
-}