(t *testing.T)
| 111 | } |
| 112 | |
| 113 | func TestBodyMinLen_Fail(t *testing.T) { |
| 114 | r := &rule.BodyMinLenRule{} |
| 115 | if err := r.Apply(lint.RuleSetting{Argument: 20}); err != nil { |
| 116 | t.Fatal(err) |
| 117 | } |
| 118 | _, ok := r.Validate(&mockCommit{body: "short"}) |
| 119 | if ok { |
| 120 | t.Error("body < 20 should fail") |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | func TestBodyMaxLen_NegativeDisables(t *testing.T) { |
| 125 | r := &rule.BodyMaxLenRule{} |