(t *testing.T)
| 393 | } |
| 394 | |
| 395 | func TestScopeMinLen_Pass(t *testing.T) { |
| 396 | r := &rule.ScopeMinLenRule{} |
| 397 | if err := r.Apply(lint.RuleSetting{Argument: 2}); err != nil { |
| 398 | t.Fatal(err) |
| 399 | } |
| 400 | _, ok := r.Validate(&mockCommit{scope: "auth"}) |
| 401 | if !ok { |
| 402 | t.Error("scope len >= 2 should pass") |
| 403 | } |
| 404 | } |
| 405 | |
| 406 | func TestScopeMaxLen_NegativeDisables(t *testing.T) { |
| 407 | r := &rule.ScopeMaxLenRule{} |