mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
tests Add test for loading task not present in TW
This commit is contained in:
parent
d3457479c0
commit
7da15db25f
1 changed files with 21 additions and 0 deletions
|
@ -26,6 +26,27 @@ class TestSimpleTaskCreation(IntegrationTest):
|
|||
assert task['status'] == 'pending'
|
||||
|
||||
|
||||
class TestInvalidUUIDTask(IntegrationTest):
|
||||
|
||||
viminput = """
|
||||
* [ ] This is a test task #abc123ef
|
||||
"""
|
||||
|
||||
vimoutput = """
|
||||
* [ ] This is a test task #{uuid}
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
self.command("w", regex="on line 1 will be re-created")
|
||||
|
||||
# Check that only one tasks with this description exists
|
||||
assert len(self.tw.tasks.pending()) == 1
|
||||
|
||||
task = self.tw.tasks.pending()[0]
|
||||
assert task['description'] == 'This is a test task'
|
||||
assert task['status'] == 'pending'
|
||||
|
||||
|
||||
class TestSimpleTaskModification(IntegrationTest):
|
||||
|
||||
viminput = """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue