mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Test: Added recurrence upgrade tests
This commit is contained in:
parent
617d1eaf3b
commit
8b68f7317c
1 changed files with 18 additions and 2 deletions
|
@ -351,10 +351,26 @@ class TestBug955(TestCase):
|
||||||
code, out, err = self.t.runError("ls")
|
code, out, err = self.t.runError("ls")
|
||||||
self.assertIn("No matches", err)
|
self.assertIn("No matches", err)
|
||||||
|
|
||||||
|
class TestUpgradeToRecurring(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
"""Executed before each test in the class"""
|
||||||
|
self.t = Task()
|
||||||
|
|
||||||
|
def test_upgrade(self):
|
||||||
|
"""Upgrade task to recurring"""
|
||||||
|
self.t("add foo")
|
||||||
|
self.t("1 modify due:tomorrow recur:weekly")
|
||||||
|
code, out, err = self.t("_get 1.status")
|
||||||
|
self.assertEqual("recurring\n", out)
|
||||||
|
|
||||||
|
def test_failed_upgrade(self):
|
||||||
|
"""Attempt an upgrade, but omit the due date"""
|
||||||
|
self.t("add foo")
|
||||||
|
code, out, err = self.t.runError("1 modify recur:weekly")
|
||||||
|
self.assertIn("You cannot specify a recurring task without a due date.", err)
|
||||||
|
|
||||||
|
|
||||||
# TODO Wait a recurring task
|
# TODO Wait a recurring task
|
||||||
# TODO Upgrade a task to a recurring task
|
|
||||||
# TODO Upgrade a task to a recurring task, but omit the due date (error handling)
|
|
||||||
# TODO Downgrade a recurring task to a regular task
|
# TODO Downgrade a recurring task to a regular task
|
||||||
# TODO Duplicate a recurring child task
|
# TODO Duplicate a recurring child task
|
||||||
# TODO Duplicate a recurring parent task
|
# TODO Duplicate a recurring parent task
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue