(t *testing.T)
| 760 | } |
| 761 | |
| 762 | func TestBodyCaseRule_Fail(t *testing.T) { |
| 763 | r := &rule.BodyCaseRule{} |
| 764 | if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil { |
| 765 | t.Fatal(err) |
| 766 | } |
| 767 | _, ok := r.Validate(&mockCommit{body: "This is the body"}) |
| 768 | if ok { |
| 769 | t.Error("capitalized body should fail lower-case rule") |
| 770 | } |
| 771 | } |
| 772 | |
| 773 | func TestBodyCaseRule_MultiLine_AllFail(t *testing.T) { |
| 774 | r := &rule.BodyCaseRule{} |