Commit 0fade4a5 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add test to check weekday pattern for today's weekday.

This corresponds to the change made in commit 33794435.
parent fb61db1e
......@@ -29,6 +29,7 @@ class RelativeDateTester(TopydoTest):
self.today = date(2015, 11, 6)
self.tomorrow = date(2015, 11, 7)
self.monday = date(2015, 11, 9)
self.friday = date(2015, 11, 13)
def test_zero_days(self):
result = relative_date_to_date('0d')
......@@ -142,5 +143,13 @@ class RelativeDateTester(TopydoTest):
result = relative_date_to_date('-0d')
self.assertTrue(result, self.today)
def test_weekday_next_week(self):
"""
When entering "Friday" on a Friday, return next week Friday instead of
today.
"""
result = relative_date_to_date("fri")
self.assertTrue(result, self.friday)
if __name__ == '__main__':
unittest.main()
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