| 1210 | } |
| 1211 | |
| 1212 | func TestSignedOffBy_NoColon_Present_Pass(t *testing.T) { |
| 1213 | r := &rule.SignedOffByRule{} |
| 1214 | if err := r.Apply(lint.RuleSetting{Argument: "Signed-off-by"}); err != nil { |
| 1215 | t.Fatal(err) |
| 1216 | } |
| 1217 | _, ok := r.Validate(&mockCommit{notes: []lint.Note{&mockNote{token: "Signed-off-by", value: "Jane Doe <jane@example.com>"}}}) |
| 1218 | if !ok { |
| 1219 | t.Error("message with Signed-off-by should pass") |
| 1220 | } |
| 1221 | } |
| 1222 | |
| 1223 | func TestSignedOffBy_Missing_Fail(t *testing.T) { |
| 1224 | r := &rule.SignedOffByRule{} |