diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-02 15:08:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-02 15:08:01 +0000 |
commit | b375c6c05fbd03aea33a9ee9f82e678bdaa8c3cc (patch) | |
tree | 55f2a32e5fd3d67597fc8c6cc2a01793ee15c87a /spec/helpers | |
parent | 988b28ec1a379d38f6ac9ed04886ee564fd447fd (diff) | |
download | gitlab-ce-b375c6c05fbd03aea33a9ee9f82e678bdaa8c3cc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/award_emoji_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/boards_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/events_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/issuables_helper_spec.rb | 4 | ||||
-rw-r--r-- | spec/helpers/issues_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/labels_helper_spec.rb | 14 | ||||
-rw-r--r-- | spec/helpers/notes_helper_spec.rb | 2 |
7 files changed, 10 insertions, 18 deletions
diff --git a/spec/helpers/award_emoji_helper_spec.rb b/spec/helpers/award_emoji_helper_spec.rb index 975f32edd42..3dee466a80c 100644 --- a/spec/helpers/award_emoji_helper_spec.rb +++ b/spec/helpers/award_emoji_helper_spec.rb @@ -64,7 +64,7 @@ describe AwardEmojiHelper do it 'returns correct url' do @project = issue.project - expected_url = "/#{@project.namespace.path}/#{@project.path}/issues/#{issue.iid}/toggle_award_emoji" + expected_url = "/#{@project.namespace.path}/#{@project.path}/-/issues/#{issue.iid}/toggle_award_emoji" expect(subject).to eq(expected_url) end diff --git a/spec/helpers/boards_helper_spec.rb b/spec/helpers/boards_helper_spec.rb index e731b95586f..f5e5285554c 100644 --- a/spec/helpers/boards_helper_spec.rb +++ b/spec/helpers/boards_helper_spec.rb @@ -11,7 +11,7 @@ describe BoardsHelper do @project = project @board = create(:board, project: @project) - expect(build_issue_link_base).to eq("/#{@project.namespace.path}/#{@project.path}/issues") + expect(build_issue_link_base).to eq("/#{@project.namespace.path}/#{@project.path}/-/issues") end end diff --git a/spec/helpers/events_helper_spec.rb b/spec/helpers/events_helper_spec.rb index 062fa8f106e..61229127770 100644 --- a/spec/helpers/events_helper_spec.rb +++ b/spec/helpers/events_helper_spec.rb @@ -110,7 +110,7 @@ describe EventsHelper do it 'returns a project issue url' do event.target = create(:note_on_issue, note: 'nice work') - expect(subject).to eq("#{project_base_url}/issues/#{event.note_target.iid}#note_#{event.target.id}") + expect(subject).to eq("#{project_base_url}/-/issues/#{event.note_target.iid}#note_#{event.target.id}") end it 'returns a merge request url' do diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb index a39110d0aa7..7971eb8849d 100644 --- a/spec/helpers/issuables_helper_spec.rb +++ b/spec/helpers/issuables_helper_spec.rb @@ -183,8 +183,8 @@ describe IssuablesHelper do @project = issue.project expected_data = { - endpoint: "/#{@project.full_path}/issues/#{issue.iid}", - updateEndpoint: "/#{@project.full_path}/issues/#{issue.iid}.json", + endpoint: "/#{@project.full_path}/-/issues/#{issue.iid}", + updateEndpoint: "/#{@project.full_path}/-/issues/#{issue.iid}.json", canUpdate: true, canDestroy: true, issuableRef: "##{issue.iid}", diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index a394812f8f0..dad740d3b80 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -200,7 +200,7 @@ describe IssuesHelper do shared_examples 'successfully displays link to issue and with css class' do |action| it 'returns link' do - link = "<a class=\"#{css_class}\" href=\"/#{new_issue.project.full_path}/issues/#{new_issue.iid}\">(#{action})</a>" + link = "<a class=\"#{css_class}\" href=\"/#{new_issue.project.full_path}/-/issues/#{new_issue.iid}\">(#{action})</a>" expect(helper.issue_closed_link(issue, user, css_class: css_class)).to match(link) end diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb index 322390c3840..ec70041d51f 100644 --- a/spec/helpers/labels_helper_spec.rb +++ b/spec/helpers/labels_helper_spec.rb @@ -56,7 +56,7 @@ describe LabelsHelper do context 'without subject' do it "uses the label's project" do - expect(link_to_label(label_presenter)).to match %r{<a.*href="/#{label.project.full_path}/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m + expect(link_to_label(label_presenter)).to match %r{<a.*href="/#{label.project.full_path}/-/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m end end @@ -65,7 +65,7 @@ describe LabelsHelper do let(:subject) { build(:project, namespace: namespace, name: 'bar3') } it 'links to project issues page' do - expect(link_to_label(label_presenter)).to match %r{<a.*href="/foo3/bar3/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m + expect(link_to_label(label_presenter)).to match %r{<a.*href="/foo3/bar3/-/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m end end @@ -78,15 +78,7 @@ describe LabelsHelper do end context 'with a type argument' do - ['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>}m - end - end - end - - ['merge_request', :merge_request].each do |type| + ['issue', :issue, '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>}m diff --git a/spec/helpers/notes_helper_spec.rb b/spec/helpers/notes_helper_spec.rb index 1dc7f4e98ab..f074a918e7f 100644 --- a/spec/helpers/notes_helper_spec.rb +++ b/spec/helpers/notes_helper_spec.rb @@ -272,7 +272,7 @@ describe NotesHelper do let(:note) { create(:note_on_issue, noteable: issue, project: project) } it 'returns the noteable url with an anchor to the note' do - expect(noteable_note_url(note)).to match("/#{project.namespace.path}/#{project.path}/issues/#{issue.iid}##{dom_id(note)}") + expect(noteable_note_url(note)).to match("/#{project.namespace.path}/#{project.path}/-/issues/#{issue.iid}##{dom_id(note)}") end end |