(t *testing.T)
| 727 | } |
| 728 | |
| 729 | func TestDescriptionCaseRule_Fail(t *testing.T) { |
| 730 | r := &rule.DescriptionCaseRule{} |
| 731 | if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil { |
| 732 | t.Fatal(err) |
| 733 | } |
| 734 | _, ok := r.Validate(&mockCommit{description: "Add new feature"}) |
| 735 | if ok { |
| 736 | t.Error("capitalized description should fail lower-case rule") |
| 737 | } |
| 738 | } |
| 739 | |
| 740 | func TestBodyCaseRule_LowerPass(t *testing.T) { |
| 741 | r := &rule.BodyCaseRule{} |