Commit 6bb804dc authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add test to add completed items

Inspired by issue #82.
parent 11d27e89
......@@ -334,6 +334,16 @@ class AddCommandTest(CommandTest):
self.assertEqual(self.todolist.todo(1).source(), "New todo")
self.assertEqual(self.errors, "")
def test_add_completed(self):
""" Add a command that is completed automatically. """
command = AddCommand.AddCommand(["x 2015-01-01 Already completed"],
self.todolist, self.out, self.error)
command.execute()
self.assertEqual(self.output,
"| 1| x 2015-01-01 {} Already completed\n".format(self.today))
self.assertEqual(self.errors, "")
def test_help(self):
command = AddCommand.AddCommand(["help"], self.todolist, self.out,
self.error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment