(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestHeadMinLen_Fail(t *testing.T) { |
| 36 | r := &rule.HeadMinLenRule{} |
| 37 | if err := r.Apply(lint.RuleSetting{Argument: 10}); err != nil { |
| 38 | t.Fatal(err) |
| 39 | } |
| 40 | issue, ok := r.Validate(&mockCommit{header: "short"}) |
| 41 | if ok { |
| 42 | t.Error("header length < 10 should fail") |
| 43 | } |
| 44 | if issue == nil || issue.Description() == "" { |
| 45 | t.Error("expected non-empty issue description") |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | func TestHeadMinLen_BadArg(t *testing.T) { |
| 50 | r := &rule.HeadMinLenRule{} |
nothing calls this directly
no test coverage detected