fix deleting recurring task

This commit is contained in:
DavidBadura 2015-04-23 19:55:25 +00:00
parent bcbb955e28
commit 4ebaee91aa
2 changed files with 4 additions and 9 deletions

View File

@ -133,13 +133,8 @@ class TaskManager
return;
}
if ($task->isRecurring()) {
$task->setUntil('now');
$this->save($task);
} else {
$this->taskwarrior->delete($task->getUuid());
$this->refresh($task);
}
$this->taskwarrior->delete($task->getUuid());
$this->refresh($task);
}
/**

View File

@ -670,8 +670,6 @@ class TaskManagerTest extends \PHPUnit_Framework_TestCase
public function testRecurringDelete()
{
$this->markTestIncomplete('not working yet');
$recur1 = new Recurring(Recurring::DAILY);
$task1 = new Task();
@ -683,12 +681,14 @@ class TaskManagerTest extends \PHPUnit_Framework_TestCase
$this->taskManager->clear();
$this->assertCount(1, $this->taskManager->filterAll('status:recurring'));
$this->assertCount(2, $this->taskManager->filterAll());
$this->taskManager->delete($task1);
$this->taskManager->clear();
$this->assertCount(0, $this->taskManager->filterAll('status:recurring'));
$this->assertCount(2, $this->taskManager->filterAll());
}
public function testUntil()