mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
tests: Add test for simple task saving from vim
This commit is contained in:
parent
4d7ea13d7f
commit
bf254b70f4
1 changed files with 17 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue