(t *testing.T)
| 858 | } |
| 859 | |
| 860 | func TestScopeEmptyRule_NonEmptyPasses(t *testing.T) { |
| 861 | r := &rule.ScopeEmptyRule{} |
| 862 | if err := r.Apply(lint.RuleSetting{}); err != nil { |
| 863 | t.Fatal(err) |
| 864 | } |
| 865 | _, ok := r.Validate(&mockCommit{scope: "auth"}) |
| 866 | if !ok { |
| 867 | t.Error("non-empty scope should pass scope-empty rule") |
| 868 | } |
| 869 | } |
| 870 | |
| 871 | func TestScopeEmptyRule_EmptyFails(t *testing.T) { |
| 872 | r := &rule.ScopeEmptyRule{} |