diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-11-03 06:07:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-11-03 06:07:45 +0000 |
commit | 5f208e04c159791e668031a7fa83f98724ec8d24 (patch) | |
tree | 4b58b42fd2a91a14871010e2dd39369a839ae383 /qa/test_hooks.py | |
parent | Adding upstream version 0.13.1. (diff) | |
download | gitlint-5f208e04c159791e668031a7fa83f98724ec8d24.tar.xz gitlint-5f208e04c159791e668031a7fa83f98724ec8d24.zip |
Adding upstream version 0.14.0.upstream/0.14.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | qa/test_hooks.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qa/test_hooks.py b/qa/test_hooks.py index a41580b..7c07a61 100644 --- a/qa/test_hooks.py +++ b/qa/test_hooks.py @@ -53,6 +53,18 @@ class HookTests(BaseTestCase): stdin.put("{0}\n".format(response)) self.response_index = (self.response_index + 1) % len(self.responses) + def test_commit_hook_no_violations(self): + test_filename = self.create_simple_commit(u"This ïs a title\n\nBody contënt that should work", + out=self._interact, tty_in=True) + + short_hash = self.get_last_commit_short_hash() + expected_output = ["gitlint: checking commit message...\n", + "gitlint: \x1b[32mOK\x1b[0m (no violations in commit message)\n", + u"[master %s] This ïs a title\n" % short_hash, + " 1 file changed, 0 insertions(+), 0 deletions(-)\n", + u" create mode 100644 %s\n" % test_filename] + self.assertListEqual(expected_output, self.githook_output) + def test_commit_hook_continue(self): self.responses = ["y"] test_filename = self.create_simple_commit(u"WIP: This ïs a title.\nContënt on the second line", |