mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 09:53:08 +02:00
Test: Add confirmation test on recurrence.t
I'm a little unsure about the correct behaviour here. I would expect both features to depend on rc.recurrence.confirmation and not rc.confirmation. Yet when rc.confirmation=on no prompt is shown about recurring parents.
This commit is contained in:
parent
0f8c995934
commit
3908c29a21
1 changed files with 19 additions and 5 deletions
|
@ -312,15 +312,29 @@ class TestBug955(TestCase):
|
|||
def setUp(self):
|
||||
self.t = Task()
|
||||
|
||||
def test_no_prompt_for_parent_on_child_delete(self):
|
||||
"""Deleting a child of a recurring task doesn't prompt for parent deletion
|
||||
|
||||
Previously bug.955.t
|
||||
"""
|
||||
self.t("add foo due:now recur:1day")
|
||||
code, out, err = self.t("ls")
|
||||
self.assertRegexpMatches(out, re.compile("^2 tasks", re.MULTILINE))
|
||||
|
||||
def test_no_prompt_for_parent_on_child_delete_confirmation_off(self):
|
||||
"""Deleting a child of a recurring task prompts for parent deletion (confirmation:off)
|
||||
|
||||
Previously bug.955.t
|
||||
"""
|
||||
self.t.config("confirmation", "off")
|
||||
|
||||
self.validate()
|
||||
|
||||
def test_no_prompt_for_parent_on_child_delete_confirmation_on(self):
|
||||
"""Deleting a child of a recurring task prompts for parent deletion (confirmation:on)
|
||||
|
||||
Previously bug.955.t
|
||||
"""
|
||||
self.t.config("confirmation", "on")
|
||||
|
||||
self.validate()
|
||||
|
||||
def validate(self):
|
||||
code, out, err = self.t("2 delete", input="n\ny\n")
|
||||
self.assertIn("Deleting task 2", out)
|
||||
self.assertIn("Deleted 1 task", out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue