mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
tests: Add a test case for flawed due date
This commit is contained in:
parent
947090ce52
commit
f9dedc1dbc
1 changed files with 22 additions and 0 deletions
|
@ -111,6 +111,28 @@ class TestSimpleTaskWithDueDatetimeCreation(IntegrationTest):
|
||||||
assert task['due'] == local_zone.localize(due)
|
assert task['due'] == local_zone.localize(due)
|
||||||
|
|
||||||
|
|
||||||
|
class TestSimpleTaskWithFlawedDueDatetimeCreation(IntegrationTest):
|
||||||
|
|
||||||
|
viminput = """
|
||||||
|
* [ ] This is a test task (2015-94-53 12:00)
|
||||||
|
"""
|
||||||
|
|
||||||
|
vimoutput = """
|
||||||
|
* [ ] This is a test task #{uuid}
|
||||||
|
"""
|
||||||
|
|
||||||
|
def execute(self):
|
||||||
|
self.command("w", regex="Invalid timestamp", lines=2)
|
||||||
|
|
||||||
|
# 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'
|
||||||
|
assert task['due'] == None
|
||||||
|
|
||||||
|
|
||||||
class TestSimpleTaskWithDueDateCreation(IntegrationTest):
|
class TestSimpleTaskWithDueDateCreation(IntegrationTest):
|
||||||
|
|
||||||
viminput = """
|
viminput = """
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue