(t *testing.T)
| 749 | } |
| 750 | |
| 751 | func TestBodyCaseRule_EmptyBodyAlwaysPasses(t *testing.T) { |
| 752 | r := &rule.BodyCaseRule{} |
| 753 | if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil { |
| 754 | t.Fatal(err) |
| 755 | } |
| 756 | _, ok := r.Validate(&mockCommit{body: ""}) |
| 757 | if !ok { |
| 758 | t.Error("empty body should pass body-case") |
| 759 | } |
| 760 | } |
| 761 | |
| 762 | func TestBodyCaseRule_Fail(t *testing.T) { |
| 763 | r := &rule.BodyCaseRule{} |