From 643bc3635e75121826fb878f46ca540ce210bace Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 19 Apr 2021 15:27:09 +0200 Subject: Adding upstream version 0.15.1. Signed-off-by: Daniel Baumann --- gitlint/tests/rules/test_body_rules.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gitlint/tests/rules/test_body_rules.py') 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() -- cgit v1.2.3