mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Test: Added test for orphans listed in 'udas' output
This commit is contained in:
parent
18c19ab9ed
commit
611cf69c99
1 changed files with 20 additions and 0 deletions
20
test/uda.t
20
test/uda.t
|
@ -65,6 +65,26 @@ class TestUdaCommand(TestBaseUda):
|
||||||
self.assertIn("extra", out)
|
self.assertIn("extra", out)
|
||||||
|
|
||||||
|
|
||||||
|
class TestUdaCommandOrphans(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.t = Task()
|
||||||
|
|
||||||
|
def test_uda_command_orphans(self):
|
||||||
|
"""The 'udas' command should list 'orphans'"""
|
||||||
|
# Create a task with a UDA.
|
||||||
|
self.t.config("uda.orphan.label", "orphan")
|
||||||
|
self.t.config("uda.orphan.type", "string")
|
||||||
|
self.t("add one orphan:Annie")
|
||||||
|
|
||||||
|
# Convert the UDA to an orphan.
|
||||||
|
self.t.del_config("uda.orphan.label")
|
||||||
|
self.t.del_config("uda.orphan.type")
|
||||||
|
|
||||||
|
code, out, err = self.t("udas")
|
||||||
|
self.assertIn("1 UDA defined", out)
|
||||||
|
self.assertIn("1 Orphan UDA", out)
|
||||||
|
|
||||||
|
|
||||||
class TestUdaDate(TestBaseUda):
|
class TestUdaDate(TestBaseUda):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestUdaDate, self).setUp()
|
super(TestUdaDate, self).setUp()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue