(t *testing.T)
| 694 | } |
| 695 | |
| 696 | func TestScopeCaseRule_EmptyScopeAlwaysPasses(t *testing.T) { |
| 697 | r := &rule.ScopeCaseRule{} |
| 698 | if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil { |
| 699 | t.Fatal(err) |
| 700 | } |
| 701 | _, ok := r.Validate(&mockCommit{scope: ""}) |
| 702 | if !ok { |
| 703 | t.Error("empty scope should always pass scope-case") |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | func TestScopeCaseRule_Fail(t *testing.T) { |
| 708 | r := &rule.ScopeCaseRule{} |