mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Tests: test for overlapping interval prevention
This commit is contained in:
parent
b15bc11ba3
commit
138245f010
1 changed files with 6 additions and 0 deletions
|
@ -112,6 +112,12 @@ class TestTrack(TestCase):
|
|||
self.assertIn('5959', j[0]['start'])
|
||||
self.assertIn('0101', j[0]['end'])
|
||||
|
||||
def test_overlap_prevention(self):
|
||||
"""Test adding an overlapping interval fails"""
|
||||
self.t("track 20160709T1400 - 20160709T1500 foo")
|
||||
code, out, err = self.t.runError("track 20160709T1430 - 20160709T1530 foo")
|
||||
self.assertIn('You cannot overlap intervals. Adjust the start/end time, or specify the :adjust hint.', err)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue