(t *testing.T)
| 683 | } |
| 684 | |
| 685 | func TestScopeCaseRule_LowerPass(t *testing.T) { |
| 686 | r := &rule.ScopeCaseRule{} |
| 687 | if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil { |
| 688 | t.Fatal(err) |
| 689 | } |
| 690 | _, ok := r.Validate(&mockCommit{scope: "auth"}) |
| 691 | if !ok { |
| 692 | t.Error("lowercase scope should pass") |
| 693 | } |
| 694 | } |
| 695 | |
| 696 | func TestScopeCaseRule_EmptyScopeAlwaysPasses(t *testing.T) { |
| 697 | r := &rule.ScopeCaseRule{} |