summaryrefslogtreecommitdiffstats
path: root/gitlint/tests/rules/test_body_rules.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-19 13:27:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-19 13:27:09 +0000
commit643bc3635e75121826fb878f46ca540ce210bace (patch)
treedf410cfc4a0c1c67068d40f4d10c8ca5574a4b1c /gitlint/tests/rules/test_body_rules.py
parentAdding upstream version 0.15.0. (diff)
downloadgitlint-643bc3635e75121826fb878f46ca540ce210bace.tar.xz
gitlint-643bc3635e75121826fb878f46ca540ce210bace.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.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()