test: ensure commit with body can be parsed

This commit is contained in:
jo 2024-11-13 15:17:59 +01:00 committed by Julian Tölle
parent faf28fd314
commit c0d71fb6e4

View file

@ -125,6 +125,24 @@ func TestAnalyzeCommits(t *testing.T) {
},
wantErr: assert.NoError,
},
{
name: "success with body",
commits: []git.Commit{
{
Message: "feat: some thing (hz/fl!144)\n\nFixes #15\n\nDepends on !143",
},
},
expectedCommits: []commitparser.AnalyzedCommit{
{
Commit: git.Commit{Message: "feat: some thing (hz/fl!144)\n\nFixes #15\n\nDepends on !143"},
Type: "feat",
Description: "some thing (hz/fl!144)",
BreakingChange: false,
},
},
wantErr: assert.NoError,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {