summaryrefslogtreecommitdiff
path: root/tests/integration/OverdueTaskTest.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/OverdueTaskTest.php
parent922e0fb6de06a98774418612e0b0f75af72b6dbb (diff)
Added application and project roles validation for API procedure calls
Diffstat (limited to 'tests/integration/OverdueTaskTest.php')
-rw-r--r--tests/integration/OverdueTaskTest.php43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/integration/OverdueTaskTest.php b/tests/integration/OverdueTaskTest.php
deleted file mode 100644
index 1dea5030..00000000
--- a/tests/integration/OverdueTaskTest.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-require_once __DIR__.'/BaseIntegrationTest.php';
-
-class OverdueTaskTest extends BaseIntegrationTest
-{
- protected $projectName = 'My project to test overdue tasks';
-
- public function testAll()
- {
- $this->assertCreateTeamProject();
- $this->assertCreateOverdueTask();
- $this->assertGetOverdueTasksByProject();
- $this->assertGetOverdueTasks();
- }
-
- public function assertCreateOverdueTask()
- {
- $this->assertNotFalse($this->app->createTask(array(
- 'title' => 'overdue task',
- 'project_id' => $this->projectId,
- 'date_due' => date('Y-m-d', strtotime('-2days')),
- )));
- }
-
- public function assertGetOverdueTasksByProject()
- {
- $tasks = $this->app->getOverdueTasksByProject($this->projectId);
- $this->assertNotEmpty($tasks);
- $this->assertCount(1, $tasks);
- $this->assertEquals('overdue task', $tasks[0]['title']);
- $this->assertEquals($this->projectName, $tasks[0]['project_name']);
- }
-
- public function assertGetOverdueTasks()
- {
- $tasks = $this->app->getOverdueTasks();
- $this->assertNotEmpty($tasks);
- $this->assertCount(1, $tasks);
- $this->assertEquals('overdue task', $tasks[0]['title']);
- $this->assertEquals($this->projectName, $tasks[0]['project_name']);
- }
-}