(t *testing.T)
| 891 | } |
| 892 | |
| 893 | func TestBodyEmptyRule_EmptyFails(t *testing.T) { |
| 894 | r := &rule.BodyEmptyRule{} |
| 895 | if err := r.Apply(lint.RuleSetting{}); err != nil { |
| 896 | t.Fatal(err) |
| 897 | } |
| 898 | _, ok := r.Validate(&mockCommit{body: ""}) |
| 899 | if ok { |
| 900 | t.Error("empty body should fail body-empty rule") |
| 901 | } |
| 902 | } |
| 903 | |
| 904 | func TestFooterEmptyRule_NonEmptyPasses(t *testing.T) { |
| 905 | r := &rule.FooterEmptyRule{} |