From 123c68a7cf788ace140e57e478a12c5b7ac893ae Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 16 Dec 2019 18:08:22 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/helpers/award_emoji_helper_spec.rb | 2 +- spec/helpers/events_helper_spec.rb | 2 +- spec/helpers/labels_helper_spec.rb | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'spec/helpers') 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{.*} 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{.*} + end + end + end end context 'with a tooltip argument' do -- cgit v1.2.1