diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-08-12 22:17:01 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-08-12 22:17:01 -0400 |
commit | 8d43897e26d0979184978ee731331e051fb086ed (patch) | |
tree | ca67e7c89574e83aa2c6c0468fabf97453e150ef /tests/units | |
parent | 94abf4f4d6655e96c4448eb287eaaebce85f77ef (diff) |
Fix bug task estimate is reseted when using subtask timer
Diffstat (limited to 'tests/units')
-rw-r--r-- | tests/units/SubtaskTimeTrackingTest.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/units/SubtaskTimeTrackingTest.php b/tests/units/SubtaskTimeTrackingTest.php index 27ba7c7d..661812d4 100644 --- a/tests/units/SubtaskTimeTrackingTest.php +++ b/tests/units/SubtaskTimeTrackingTest.php @@ -209,6 +209,9 @@ class SubtaskTimeTrackingTest extends Base $this->assertEquals(1, $s->create(array('title' => 'subtask #1', 'task_id' => 1, 'time_spent' => 2.2))); $this->assertEquals(2, $s->create(array('title' => 'subtask #2', 'task_id' => 1, 'time_estimated' => 1))); + $this->assertEquals(3, $s->create(array('title' => 'subtask #3', 'task_id' => 2, 'time_spent' => 3.4))); + $this->assertEquals(4, $s->create(array('title' => 'subtask #4', 'task_id' => 2, 'time_estimated' => 1.25))); + $st->updateTaskTimeTracking(1); $st->updateTaskTimeTracking(2); @@ -219,8 +222,8 @@ class SubtaskTimeTrackingTest extends Base $task = $tf->getById(2); $this->assertNotEmpty($task); - $this->assertEquals(0.5, $task['time_spent'], 'Total spent', 0.01); - $this->assertEquals(1.5, $task['time_estimated'], 'Total estimated', 0.01); + $this->assertEquals(3.9, $task['time_spent'], 'Total spent', 0.01); + $this->assertEquals(2.75, $task['time_estimated'], 'Total estimated', 0.01); } public function testGetCalendarEvents() |