(t *testing.T)
| 1261 | } |
| 1262 | |
| 1263 | func TestTrailerExists_Missing_Fail(t *testing.T) { |
| 1264 | r := &rule.TrailerExistsRule{} |
| 1265 | if err := r.Apply(lint.RuleSetting{Argument: "Co-authored-by:"}); err != nil { |
| 1266 | t.Fatal(err) |
| 1267 | } |
| 1268 | _, ok := r.Validate(&mockCommit{}) |
| 1269 | if ok { |
| 1270 | t.Error("commit without Co-authored-by note should fail") |
| 1271 | } |
| 1272 | } |
| 1273 | |
| 1274 | // ============================================================ |
| 1275 | // Breaking-change-exclamation-mark rule |