(t *testing.T)
| 738 | } |
| 739 | |
| 740 | func TestBodyCaseRule_LowerPass(t *testing.T) { |
| 741 | r := &rule.BodyCaseRule{} |
| 742 | if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil { |
| 743 | t.Fatal(err) |
| 744 | } |
| 745 | _, ok := r.Validate(&mockCommit{body: "this is the body"}) |
| 746 | if !ok { |
| 747 | t.Error("lowercase body should pass") |
| 748 | } |
| 749 | } |
| 750 | |
| 751 | func TestBodyCaseRule_EmptyBodyAlwaysPasses(t *testing.T) { |
| 752 | r := &rule.BodyCaseRule{} |