(t *testing.T)
| 1038 | } |
| 1039 | |
| 1040 | func TestDescriptionFullStop_WithStop_Fail(t *testing.T) { |
| 1041 | r := &rule.DescriptionFullStopRule{} |
| 1042 | if err := r.Apply(lint.RuleSetting{Argument: "."}); err != nil { |
| 1043 | t.Fatal(err) |
| 1044 | } |
| 1045 | _, ok := r.Validate(&mockCommit{description: "add new feature."}) |
| 1046 | if ok { |
| 1047 | t.Error("description ending with '.' should fail") |
| 1048 | } |
| 1049 | } |
| 1050 | |
| 1051 | func TestDescriptionFullStop_EmptyDescription_Pass(t *testing.T) { |
| 1052 | r := &rule.DescriptionFullStopRule{} |