diff options
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/projects/builds/show.html.haml_spec.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index 464051063d8..1dc2048e1bc 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -59,14 +59,20 @@ describe 'projects/builds/show' do end it 'shows trigger variables in separate lines' do - expect(rendered).to have_css('code', text: variable_regexp('TRIGGER_KEY_1', 'TRIGGER_VALUE_1')) - expect(rendered).to have_css('code', text: variable_regexp('TRIGGER_KEY_2', 'TRIGGER_VALUE_2')) + expect(rendered).to have_css('.js-build-variable', visible: false, text: variable_regexp_key('TRIGGER_KEY_1')) + expect(rendered).to have_css('.js-build-variable', visible: false, text: variable_regexp_key('TRIGGER_KEY_2')) + expect(rendered).to have_css('.js-build-value', visible: false, text: variable_regexp_value('TRIGGER_VALUE_1')) + expect(rendered).to have_css('.js-build-value', visible: false, text: variable_regexp_value('TRIGGER_VALUE_2')) end end private - def variable_regexp(key, value) - /\A#{Regexp.escape("#{key}=#{value}")}\Z/ + def variable_regexp_key(key) + /\A#{Regexp.escape("#{key}")}\Z/ + end + + def variable_regexp_value(value) + /\A#{Regexp.escape("#{value}")}\Z/ end end |