diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-04-19 13:27:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-04-19 13:27:09 +0000 |
commit | 643bc3635e75121826fb878f46ca540ce210bace (patch) | |
tree | df410cfc4a0c1c67068d40f4d10c8ca5574a4b1c /gitlint/tests/rules/test_body_rules.py | |
parent | Adding upstream version 0.15.0. (diff) | |
download | gitlint-upstream/0.15.1.tar.xz gitlint-upstream/0.15.1.zip |
Adding upstream version 0.15.1.upstream/0.15.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gitlint/tests/rules/test_body_rules.py')
-rw-r--r-- | gitlint/tests/rules/test_body_rules.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gitlint/tests/rules/test_body_rules.py b/gitlint/tests/rules/test_body_rules.py index 96ae998..a268585 100644 --- a/gitlint/tests/rules/test_body_rules.py +++ b/gitlint/tests/rules/test_body_rules.py @@ -126,6 +126,16 @@ class BodyRuleTests(BaseTestCase): violations = rule.validate(commit) self.assertListEqual(violations, [expected_violation]) + def test_body_missing_multiple_empty_new_lines(self): + rule = rules.BodyMissing() + + # body is too short + expected_violation = rules.RuleViolation("B6", "Body message is missing", None, 3) + + commit = self.gitcommit("Tïtle\n\n\n\n") + violations = rule.validate(commit) + self.assertListEqual(violations, [expected_violation]) + def test_body_missing_merge_commit(self): rule = rules.BodyMissing() |