diff options
Diffstat (limited to 'spec/helpers/labels_helper_spec.rb')
-rw-r--r-- | spec/helpers/labels_helper_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb index 3238743ee26..e2dff05cfaa 100644 --- a/spec/helpers/labels_helper_spec.rb +++ b/spec/helpers/labels_helper_spec.rb @@ -78,13 +78,21 @@ describe LabelsHelper do end context 'with a type argument' do - ['issue', :issue, 'merge_request', :merge_request].each do |type| + ['issue', :issue].each do |type| context "set to #{type}" do it 'links to correct page' do expect(link_to_label(label_presenter, type: type)).to match %r{<a href="/#{label.project.full_path}/#{type.to_s.pluralize}\?label_name%5B%5D=#{label.name}">.*</a>} end end end + + ['merge_request', :merge_request].each do |type| + context "set to #{type}" do + it 'links to correct page' do + expect(link_to_label(label_presenter, type: type)).to match %r{<a href="/#{label.project.full_path}/-/#{type.to_s.pluralize}\?label_name%5B%5D=#{label.name}">.*</a>} + end + end + end end context 'with a tooltip argument' do |