(t *testing.T)
| 22 | } |
| 23 | |
| 24 | func TestHeadMinLen_Exact(t *testing.T) { |
| 25 | r := &rule.HeadMinLenRule{} |
| 26 | if err := r.Apply(lint.RuleSetting{Argument: 10}); err != nil { |
| 27 | t.Fatal(err) |
| 28 | } |
| 29 | _, ok := r.Validate(&mockCommit{header: "0123456789"}) |
| 30 | if !ok { |
| 31 | t.Error("header length == 10 should pass") |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | func TestHeadMinLen_Fail(t *testing.T) { |
| 36 | r := &rule.HeadMinLenRule{} |