Commit fc69d1cf authored by Etienne Baqué's avatar Etienne Baqué

Removed urls for merge_requests and issues

parent 656981e6
......@@ -12,27 +12,11 @@ module ReleasesHelper
help_page_path(DOCUMENTATION_PATH)
end
def url_for_merge_requests
project_merge_requests_url(@project, params_for_issue_and_mr_paths)
end
def url_for_issues
project_issues_url(@project, params_for_issue_and_mr_paths)
end
def data_for_releases_page
{
project_id: @project.id,
illustration_path: illustration,
documentation_path: help_page,
merge_requests_url: url_for_merge_requests,
issues_url: url_for_issues
documentation_path: help_page
}
end
private
def params_for_issue_and_mr_paths
{ scope: 'all', state: 'opened' }
end
end
......@@ -22,23 +22,9 @@ describe ReleasesHelper do
helper.instance_variable_set(:@project, project)
end
describe '#url_for_merge_requests' do
it 'returns the the correct link with the correct parameters' do
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
path = "#{project.group.path}/#{project.path}/issues?scope=all&state=opened"
expect(helper.url_for_issues).to include(path)
end
end
describe '#data_for_releases_page' do
it 'has the needed data to display release blocks' do
keys = %i(project_id illustration_path documentation_path merge_requests_url issues_url)
keys = %i(project_id illustration_path documentation_path)
expect(helper.data_for_releases_page.keys).to eq(keys)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment