Commit 72bea6ad authored by Sean McGivern's avatar Sean McGivern

Merge branch 'fix_typo_template_parser' into 'master'

Fix typo in Gitlab::Changelog::Release

See merge request gitlab-org/gitlab!80314
parents bc9b1788 23e92668
......@@ -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