(t *testing.T)
| 705 | } |
| 706 | |
| 707 | func TestScopeCaseRule_Fail(t *testing.T) { |
| 708 | r := &rule.ScopeCaseRule{} |
| 709 | if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil { |
| 710 | t.Fatal(err) |
| 711 | } |
| 712 | _, ok := r.Validate(&mockCommit{scope: "Auth"}) |
| 713 | if ok { |
| 714 | t.Error("uppercase scope should fail lower-case rule") |
| 715 | } |
| 716 | } |
| 717 | |
| 718 | func TestDescriptionCaseRule_LowerPass(t *testing.T) { |
| 719 | r := &rule.DescriptionCaseRule{} |