(t *testing.T)
| 902 | } |
| 903 | |
| 904 | func TestFooterEmptyRule_NonEmptyPasses(t *testing.T) { |
| 905 | r := &rule.FooterEmptyRule{} |
| 906 | if err := r.Apply(lint.RuleSetting{}); err != nil { |
| 907 | t.Fatal(err) |
| 908 | } |
| 909 | _, ok := r.Validate(&mockCommit{footer: "Fixes: #123"}) |
| 910 | if !ok { |
| 911 | t.Error("non-empty footer should pass footer-empty rule") |
| 912 | } |
| 913 | } |
| 914 | |
| 915 | func TestFooterEmptyRule_EmptyFails(t *testing.T) { |
| 916 | r := &rule.FooterEmptyRule{} |