File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,7 @@ int CmdStart (
4040
4141 auto interval = cli.getFilter ({now, 0 });
4242
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 ())
4844 {
4945 throw std::string (" The start command does not accept ranges but only a single datetime. "
5046 " Perhaps you want the track command?." );
Original file line number Diff line number Diff line change @@ -72,9 +72,9 @@ class TestStart(TestCase):
7272
7373 one_hour_after_utc = now_utc + timedelta (hours = 1 )
7474
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 ))
7676
77- self .assertIn ("Time tracking cannot be set in the future. " , err )
77+ self .assertIn ("Will start tracking " , out )
7878
7979 def test_start_with_open_interval (self ):
8080 """Test start with already open interval, which should be auto-stopped"""
You can’t perform that action at this time.
0 commit comments