mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Tests: Added dom.active tests
This commit is contained in:
parent
899d9848b1
commit
d8bfeea142
1 changed files with 11 additions and 0 deletions
11
test/dom.t
11
test/dom.t
|
@ -61,6 +61,17 @@ class TestDOM(TestCase):
|
|||
code, out, err = self.t.runError("get dom.NOPE")
|
||||
self.assertIn("DOM reference 'dom.NOPE' is not valid.", err)
|
||||
|
||||
def test_dom_active_active(self):
|
||||
"""Test dom.active with and with an active interval"""
|
||||
self.t("start foo")
|
||||
code, out, err = self.t("get dom.active")
|
||||
self.assertEqual('1\n', out)
|
||||
|
||||
def test_dom_active_inactive(self):
|
||||
"""Test dom.active with and without an active interval"""
|
||||
code, out, err = self.t("get dom.active")
|
||||
self.assertEqual('0\n', out)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue