(t *testing.T)
| 133 | } |
| 134 | |
| 135 | func TestBodyMaxLen_Fail(t *testing.T) { |
| 136 | r := &rule.BodyMaxLenRule{} |
| 137 | if err := r.Apply(lint.RuleSetting{Argument: 5}); err != nil { |
| 138 | t.Fatal(err) |
| 139 | } |
| 140 | _, ok := r.Validate(&mockCommit{body: "this body is too long"}) |
| 141 | if ok { |
| 142 | t.Error("body > 5 should fail") |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | func TestBodyMaxLineLen_Pass(t *testing.T) { |
| 147 | r := &rule.BodyMaxLineLenRule{} |