Commit 23e92668 authored by Vasilii Iakliushin's avatar Vasilii Iakliushin

Fix typo in Gitlab::Changelog::Release

* Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/351520
* Sentry error:
https://sentry.gitlab.net/gitlab/gitlabcom/issues/3187674

Changelog: fixed
parent e1a881c1
......@@ -67,7 +67,7 @@ module Gitlab
markdown =
begin
@config.template.evaluate(state, data).strip
rescue TemplateParser::ParseError => e
rescue TemplateParser::Error => e
raise Error, e.message
end
......
......@@ -139,6 +139,16 @@ RSpec.describe Gitlab::Changelog::Release do
OUT
end
end
context 'when template parser raises an error' do
before do
allow(config).to receive(:template).and_raise(Gitlab::TemplateParser::Error)
end
it 'raises a Changelog error' do
expect { release.to_markdown }.to raise_error(Gitlab::Changelog::Error)
end
end
end
describe '#header_start_position' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment