mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Tests: Added future tracking negative test
This commit is contained in:
parent
d87a529d08
commit
5167a05d77
1 changed files with 8 additions and 3 deletions
11
test/start.t
11
test/start.t
|
@ -64,14 +64,19 @@ class TestStart(TestCase):
|
|||
self.assertTrue('start' in j[0])
|
||||
self.assertFalse('end' in j[0])
|
||||
|
||||
def test_timed_start(self):
|
||||
"""Test timed start"""
|
||||
self.t("start 10:30am")
|
||||
def test_timed_start_past(self):
|
||||
"""Test timed start past"""
|
||||
self.t("start 00:00am")
|
||||
j = self.t.export()
|
||||
self.assertEqual(len(j), 1)
|
||||
self.assertTrue('start' in j[0])
|
||||
self.assertFalse('end' in j[0])
|
||||
|
||||
def test_timed_start_future(self):
|
||||
"""Test timed start future"""
|
||||
code, out, err = self.t.runError("start 11:59pm")
|
||||
self.assertIn("Time tracking cannot be set in the future.", err)
|
||||
|
||||
def test_start_with_open_interval(self):
|
||||
"""Test start with already open interval, which should be auto-stopped"""
|
||||
self.t("start 2016-01-01T00:00:00 foo")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue