Resharpen test stop with id should suggest modify command

- Amends #270

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2019-12-27 16:00:25 +01:00
parent 145af6603c
commit 13a8edc7ef

View file

@ -198,13 +198,13 @@ class TestStop(TestCase):
self.assertEqual(len(j), 1)
self.assertClosedInterval(j[0])
def test_stop_with_id(self):
"""Stop does not work with with ids other than one"""
def test_stop_with_id_should_suggest_modify_command(self):
"""Stop does not work with with ids, suggest modify command instead"""
self.t("start 2h ago")
self.t("start 1h ago")
code, out, err = self.t.runError("stop @1")
# If trying to stop an older interval, check that modify was suggested.
# If trying to stop the latest interval, check that modify was suggested.
self.assertIn("modify", err)
code, out, err = self.t.runError("stop @2")