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

Function TestBodyCaseRule_Fail

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

Source from the content-addressed store, hash-verified

760}
761
762func TestBodyCaseRule_Fail(t *testing.T) {
763 r := &rule.BodyCaseRule{}
764 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
765 t.Fatal(err)
766 }
767 _, ok := r.Validate(&mockCommit{body: "This is the body"})
768 if ok {
769 t.Error("capitalized body should fail lower-case rule")
770 }
771}
772
773func TestBodyCaseRule_MultiLine_AllFail(t *testing.T) {
774 r := &rule.BodyCaseRule{}

Callers

nothing calls this directly

Calls 3

ApplyMethod · 0.95
ValidateMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected