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

Function TestBodyCaseRule_LowerPass

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

Source from the content-addressed store, hash-verified

738}
739
740func TestBodyCaseRule_LowerPass(t *testing.T) {
741 r := &rule.BodyCaseRule{}
742 if err := r.Apply(lint.RuleSetting{Argument: casing.Lower}); err != nil {
743 t.Fatal(err)
744 }
745 _, ok := r.Validate(&mockCommit{body: "this is the body"})
746 if !ok {
747 t.Error("lowercase body should pass")
748 }
749}
750
751func TestBodyCaseRule_EmptyBodyAlwaysPasses(t *testing.T) {
752 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