From 76e1cbd897a9257209a741f3dacbc470531c5615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Etienne=20Baqu=C3=A9?= Date: Mon, 9 Sep 2019 10:48:18 -0400 Subject: Fixed spec and helper based on review comments --- app/helpers/releases_helper.rb | 4 ++-- changelogs/unreleased/ebaque-issue-mr-urls.yml | 5 ----- spec/helpers/releases_helper_spec.rb | 8 ++++---- 3 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 changelogs/unreleased/ebaque-issue-mr-urls.yml diff --git a/app/helpers/releases_helper.rb b/app/helpers/releases_helper.rb index e1d8b4a67c4..4d9fe345edf 100644 --- a/app/helpers/releases_helper.rb +++ b/app/helpers/releases_helper.rb @@ -13,11 +13,11 @@ module ReleasesHelper end def url_for_merge_requests - Gitlab::Routing.url_helpers.project_merge_requests_url(@project, params_for_issue_and_mr_paths) + project_merge_requests_url(@project, params_for_issue_and_mr_paths) end def url_for_issues - Gitlab::Routing.url_helpers.project_issues_url(@project, params_for_issue_and_mr_paths) + project_issues_url(@project, params_for_issue_and_mr_paths) end def data_for_releases_page diff --git a/changelogs/unreleased/ebaque-issue-mr-urls.yml b/changelogs/unreleased/ebaque-issue-mr-urls.yml deleted file mode 100644 index 67d46d92b5c..00000000000 --- a/changelogs/unreleased/ebaque-issue-mr-urls.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Provide paths for Merge Requests and Issue links in Releases page -merge_request: 32401 -author: -type: added diff --git a/spec/helpers/releases_helper_spec.rb b/spec/helpers/releases_helper_spec.rb index 30ff45edb40..ff820b3cc95 100644 --- a/spec/helpers/releases_helper_spec.rb +++ b/spec/helpers/releases_helper_spec.rb @@ -24,15 +24,15 @@ describe ReleasesHelper do describe '#url_for_merge_requests' do it 'returns the the correct link with the correct parameters' do - url = "#{project.group.path}/#{project.path}/merge_requests?scope=all&state=opened" - expect(helper.url_for_merge_requests).to include(url) + path = "#{project.group.path}/#{project.path}/merge_requests?scope=all&state=opened" + expect(helper.url_for_merge_requests).to include(path) end end describe '#url_for_issues' do it 'returns the the correct link with the correct parameters' do - url = "#{project.group.path}/#{project.path}/issues?scope=all&state=opened" - expect(helper.url_for_issues).to include(url) + path = "#{project.group.path}/#{project.path}/issues?scope=all&state=opened" + expect(helper.url_for_issues).to include(path) end end -- cgit v1.2.1