MCPcopy Index your code
hub / github.com/conventionalcommit/commitlint / TestSignedOffBy_NoColon_Present_Pass

Function TestSignedOffBy_NoColon_Present_Pass

test/rule_test.go:1212–1221  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1210}
1211
1212func 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
1223func TestSignedOffBy_Missing_Fail(t *testing.T) {
1224 r := &rule.SignedOffByRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected