From 9b34631135f29480dda3ed2df463fbb5aab7c9e4 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 12 Mar 2017 21:36:52 -0400 Subject: Simplify dashboard to use new tasks list view --- tests/units/Pagination/SubtaskPaginationTest.php | 53 ------------------------ 1 file changed, 53 deletions(-) delete mode 100644 tests/units/Pagination/SubtaskPaginationTest.php (limited to 'tests/units/Pagination/SubtaskPaginationTest.php') diff --git a/tests/units/Pagination/SubtaskPaginationTest.php b/tests/units/Pagination/SubtaskPaginationTest.php deleted file mode 100644 index 1e16c985..00000000 --- a/tests/units/Pagination/SubtaskPaginationTest.php +++ /dev/null @@ -1,53 +0,0 @@ -container); - $projectModel = new ProjectModel($this->container); - $subtaskModel = new SubtaskModel($this->container); - $subtaskPagination = new SubtaskPagination($this->container); - - $this->assertEquals(1, $projectModel->create(array('name' => 'Project #1'))); - $this->assertEquals(1, $taskCreationModel->create(array('title' => 'Task #1', 'project_id' => 1))); - $this->assertEquals(2, $taskCreationModel->create(array('title' => 'Task #2', 'project_id' => 1, 'column_id' => 2, 'owner_id' => 1))); - $this->assertEquals(1, $subtaskModel->create(array('task_id' => 1, 'title' => 'subtask #1', 'user_id' => 1))); - $this->assertEquals(2, $subtaskModel->create(array('task_id' => 2, 'title' => 'subtask #1', 'user_id' => 1))); - $this->assertEquals(3, $subtaskModel->create(array('task_id' => 1, 'title' => 'subtask #1', 'user_id' => 1))); - $this->assertEquals(4, $subtaskModel->create(array('task_id' => 2, 'title' => 'subtask #1'))); - $this->assertEquals(5, $subtaskModel->create(array('task_id' => 1, 'title' => 'subtask #1'))); - - $this->assertCount(3, $subtaskPagination->getDashboardPaginator(1, 'subtasks', 5)->getCollection()); - $this->assertCount(0, $subtaskPagination->getDashboardPaginator(2, 'subtasks', 5)->getCollection()); - $this->assertCount(3, $subtaskPagination->getDashboardPaginator(1, 'subtasks', 5)->setOrder(TaskModel::TABLE.'.id')->getCollection()); - $this->assertCount(3, $subtaskPagination->getDashboardPaginator(1, 'subtasks', 5)->setOrder('project_name')->getCollection()); - $this->assertCount(3, $subtaskPagination->getDashboardPaginator(1, 'subtasks', 5)->setOrder('task_name')->getCollection()); - $this->assertCount(3, $subtaskPagination->getDashboardPaginator(1, 'subtasks', 5)->setOrder(SubtaskModel::TABLE.'.title')->getCollection()); - } - - public function testWhenColumnIsHidden() - { - $columnModel = new ColumnModel($this->container); - $taskCreationModel = new TaskCreationModel($this->container); - $projectModel = new ProjectModel($this->container); - $subtaskModel = new SubtaskModel($this->container); - $subtaskPagination = new SubtaskPagination($this->container); - - $this->assertEquals(1, $projectModel->create(array('name' => 'Project #1'))); - $this->assertTrue($columnModel->update(1, 'test', 0, '', 1)); - $this->assertEquals(1, $taskCreationModel->create(array('title' => 'Task #1', 'project_id' => 1, 'column_id' => 1))); - $this->assertEquals(1, $subtaskModel->create(array('task_id' => 1, 'title' => 'subtask #1', 'user_id' => 1))); - - $this->assertCount(0, $subtaskPagination->getDashboardPaginator(1, 'subtasks', 5)->getCollection()); - } -} -- cgit v1.2.3