tests: Add test for simple task saving from vim

This commit is contained in:
Tomas Babej 2015-03-26 20:56:43 +01:00
parent 4d7ea13d7f
commit bf254b70f4

View file

@ -121,3 +121,20 @@ class TestViewports(IntegrationTest):
"* [ ] tag work task 1 #{0}".format(self.tasks[3]['uuid'])
]
class TestSimpleTask(IntegrationTest):
def execute(self):
lines = ["* [ ] This is a test task"]
self.write_buffer(lines)
self.command("w")
# Check that only one tasks with this description exists
matching = self.tw.tasks.filter(description="This is a test task")
assert len(matching) == 1
expected = [
"* [ ] This is a test task #{0}".format(matching[0]['uuid'])
]
assert expected == self.read_buffer()