(t *testing.T)
| 818 | } |
| 819 | |
| 820 | func TestHeaderCaseRule_Fail(t *testing.T) { |
| 821 | r := &rule.HeaderCaseRule{} |
| 822 | if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil { |
| 823 | t.Fatal(err) |
| 824 | } |
| 825 | _, ok := r.Validate(&mockCommit{header: "Feat: Add feature"}) |
| 826 | if ok { |
| 827 | t.Error("capitalized header should fail lower-case rule") |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | // ============================================================ |
| 832 | // Empty rules |