mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Add test for command track
with future time
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
1ba3ee8a32
commit
e451a135e2
1 changed files with 9 additions and 0 deletions
|
@ -125,6 +125,15 @@ class TestTrack(TestCase):
|
|||
self.assertNotIn("Note: 'bar' is a new tag", out)
|
||||
self.assertIn("Recorded bar", out)
|
||||
|
||||
def test_track_with_future_time(self):
|
||||
"""Test track with future interval is not an error"""
|
||||
now_utc = datetime.now().utcnow()
|
||||
|
||||
two_hours_after_utc = now_utc + timedelta(hours=2)
|
||||
one_hour_after_utc = now_utc + timedelta(hours=1)
|
||||
|
||||
self.t("track {:%Y-%m-%dT%H:%M:%S} - {:%Y-%m-%dT%H:%M:%S} bar".format(one_hour_after_utc, two_hours_after_utc))
|
||||
|
||||
def test_track_interval_which_encloses_month_border(self):
|
||||
"""Track an interval which encloses a month border"""
|
||||
self.t("track 20180831T220000 - 20180901T030000 foo")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue