MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / TestSignedOffBy_Missing_Fail

Function TestSignedOffBy_Missing_Fail

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

Source from the content-addressed store, hash-verified

1221}
1222
1223func TestSignedOffBy_Missing_Fail(t *testing.T) {
1224 r := &rule.SignedOffByRule{}
1225 if err := r.Apply(lint.RuleSetting{Argument: "Signed-off-by:"}); err != nil {
1226 t.Fatal(err)
1227 }
1228 _, ok := r.Validate(&mockCommit{})
1229 if ok {
1230 t.Error("commit without Signed-off-by note should fail")
1231 }
1232}
1233
1234func TestSignedOffBy_NoColon_Missing_Fail(t *testing.T) {
1235 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