(t *testing.T)
| 1005 | } |
| 1006 | |
| 1007 | func TestBodyFullStop_WithStop_Fail(t *testing.T) { |
| 1008 | r := &rule.BodyFullStopRule{} |
| 1009 | if err := r.Apply(lint.RuleSetting{Argument: "."}); err != nil { |
| 1010 | t.Fatal(err) |
| 1011 | } |
| 1012 | _, ok := r.Validate(&mockCommit{body: "This is the body."}) |
| 1013 | if ok { |
| 1014 | t.Error("body ending with '.' should fail") |
| 1015 | } |
| 1016 | } |
| 1017 | |
| 1018 | func TestBodyFullStop_EmptyBody_Pass(t *testing.T) { |
| 1019 | r := &rule.BodyFullStopRule{} |