Skip to content
Snippets Groups Projects
Commit b228787f authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Do not raise when getting value of invalid CI node

parent 61f7bede
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -55,7 +55,7 @@ module Gitlab
end
 
define_method("#{symbol}_value") do
raise Entry::InvalidError unless valid?
return unless valid?
@entries[symbol].value if @entries[symbol]
end
 
Loading
Loading
Loading
Loading
@@ -209,10 +209,8 @@ describe Gitlab::Ci::Config::Node::Global do
end
 
describe '#before_script' do
it 'raises error' do
expect { global.before_script }.to raise_error(
Gitlab::Ci::Config::Node::Entry::InvalidError
)
it 'returns nil' do
expect(global.before_script).to be_nil
end
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment