summaryrefslogtreecommitdiffstats
path: root/gitlint/tests/rules/test_body_rules.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlint/tests/rules/test_body_rules.py')
-rw-r--r--gitlint/tests/rules/test_body_rules.py10
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()