diff options
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/award_emoji_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/events_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/labels_helper_spec.rb | 10 |
3 files changed, 11 insertions, 3 deletions
diff --git a/spec/helpers/award_emoji_helper_spec.rb b/spec/helpers/award_emoji_helper_spec.rb index 2ad6b68a34c..975f32edd42 100644 --- a/spec/helpers/award_emoji_helper_spec.rb +++ b/spec/helpers/award_emoji_helper_spec.rb @@ -51,7 +51,7 @@ describe AwardEmojiHelper do it 'returns correct url' do @project = merge_request.project - expected_url = "/#{@project.namespace.path}/#{@project.path}/merge_requests/#{merge_request.iid}/toggle_award_emoji" + expected_url = "/#{@project.namespace.path}/#{@project.path}/-/merge_requests/#{merge_request.iid}/toggle_award_emoji" expect(subject).to eq(expected_url) end diff --git a/spec/helpers/events_helper_spec.rb b/spec/helpers/events_helper_spec.rb index 7853617c3ed..63a37a1f113 100644 --- a/spec/helpers/events_helper_spec.rb +++ b/spec/helpers/events_helper_spec.rb @@ -115,7 +115,7 @@ describe EventsHelper do it 'returns a merge request url' do event.target = create(:note_on_merge_request, note: 'LGTM!') - expect(subject).to eq("#{project_base_url}/merge_requests/#{event.note_target.iid}#note_#{event.target.id}") + expect(subject).to eq("#{project_base_url}/-/merge_requests/#{event.note_target.iid}#note_#{event.target.id}") end end end 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 |