Index: sitescripts/hg/test/update_issues.py |
=================================================================== |
--- a/sitescripts/hg/test/update_issues.py |
+++ b/sitescripts/hg/test/update_issues.py |
@@ -134,16 +134,27 @@ |
def test_noissue_commits_ignored(self): |
self._run_hook(['Noissue - Foo', 'noissue - Bar']) # No updates. |
def test_single_issue_referenced(self): |
updates = self._run_hook(['Issue 1337 - Foo'], update_count=1) |
self.assertEqual(updates[0][0][0], 1337) |
+ def test_multiline_commit_message(self): |
+ updates = self._run_hook(['Issue 1337 - Foo\nBar', |
+ 'Issue 1337 - Bar.\nBaz', |
+ 'Fixes 2448 - Foo\n\nBar'], |
+ update_count=2) |
+ comment_1337 = updates[0][0][1] |
+ self.assertIn('Issue 1337 - Foo...]', comment_1337) |
+ self.assertIn('Issue 1337 - Bar...]', comment_1337) |
+ comment_2448 = updates[1][0][1] |
+ self.assertIn('Fixes 2448 - Foo]', comment_2448) |
+ |
def test_missing_issue_referenced(self): |
self._run_hook(['Issue 42 - Bar'], warning_count=1) |
def test_multiple_issues_referenced(self): |
updates = self._run_hook(['Issue 1337, fixes 2448 - Foo'], |
update_count=2) |
self.assertEqual(updates[0][0][0], 1337) |
self.assertEqual(updates[1][0][0], 2448) |