Add test for GitLab merge with message in quotes

This commit is contained in:
Layla 2020-11-23 02:21:14 -05:00
parent f3bc97206a
commit 8ba581e702

View File

@ -158,6 +158,13 @@ class TestGetCommitMessageRegex(unittest.TestCase):
def test_non_merge_message(self):
matches = GET_COMMIT_MESSAGE.search("Example unrelated commit message that should get 0 matches")
self.assertEqual(matches, None)
def test_gitlab_merge_with_double_quotes(self):
matches = GET_COMMIT_MESSAGE.search("Merge branch 'branch' into 'master'\n\n\"Message in quotes!\"")
if matches:
self.assertEqual(matches.group(4), "master")
self.assertEqual(matches.group(2), "branch")
else:
self.assertTrue(False)
class TestVersionBumping(unittest.TestCase):
def test_patch_bump(self):