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

Function TestSignedOffBy_Present_Pass

test/rule_test.go:1201–1210  ·  view source on GitHub ↗

============================================================ Signed-off-by and trailer-exists rules ============================================================

(t *testing.T)

Source from the content-addressed store, hash-verified

1199// ============================================================
1200
1201func TestSignedOffBy_Present_Pass(t *testing.T) {
1202 r := &rule.SignedOffByRule{}
1203 if err := r.Apply(lint.RuleSetting{Argument: "Signed-off-by:"}); err != nil {
1204 t.Fatal(err)
1205 }
1206 _, ok := r.Validate(&mockCommit{notes: []lint.Note{&mockNote{token: "Signed-off-by", value: "Jane Doe <jane@example.com>"}}})
1207 if !ok {
1208 t.Error("message with Signed-off-by should pass")
1209 }
1210}
1211
1212func TestSignedOffBy_NoColon_Present_Pass(t *testing.T) {
1213 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