File tree 2 files changed +3
-7
lines changed
2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,7 @@ int CmdStart (
40
40
41
41
auto interval = cli.getFilter ({now, 0 });
42
42
43
- if (interval.start > now)
44
- {
45
- throw std::string (" Time tracking cannot be set in the future." );
46
- }
47
- else if (!interval.is_started () || interval.is_ended ())
43
+ if (!interval.is_started () || interval.is_ended ())
48
44
{
49
45
throw std::string (" The start command does not accept ranges but only a single datetime. "
50
46
" Perhaps you want the track command?." );
Original file line number Diff line number Diff line change @@ -72,9 +72,9 @@ class TestStart(TestCase):
72
72
73
73
one_hour_after_utc = now_utc + timedelta (hours = 1 )
74
74
75
- code , out , err = self .t . runError ("start {:%Y-%m-%dT%H:%M:%S}Z FOO" .format (one_hour_after_utc ))
75
+ code , out , err = self .t ("start {:%Y-%m-%dT%H:%M:%S}Z FOO" .format (one_hour_after_utc ))
76
76
77
- self .assertIn ("Time tracking cannot be set in the future. " , err )
77
+ self .assertIn ("Will start tracking " , out )
78
78
79
79
def test_start_with_open_interval (self ):
80
80
"""Test start with already open interval, which should be auto-stopped"""
You can’t perform that action at this time.
0 commit comments