Fix download artifacts button link:
Rails ignored unused arguments and ref_name_and_path is the last path argument, therefore we need to concatenate that parts ourselves. Otherwise, 'download' won't be shown at all.
This commit is contained in:
parent
1d51bc7dfd
commit
31e592647a
|
@ -37,6 +37,6 @@
|
||||||
%li.dropdown-header Previous Artifacts
|
%li.dropdown-header Previous Artifacts
|
||||||
- artifacts.each do |job|
|
- artifacts.each do |job|
|
||||||
%li
|
%li
|
||||||
= link_to latest_succeeded_namespace_project_artifacts_path(project.namespace, project, ref, 'download', job: job.name), rel: 'nofollow' do
|
= link_to latest_succeeded_namespace_project_artifacts_path(project.namespace, project, "#{ref}/download", job: job.name), rel: 'nofollow' do
|
||||||
%i.fa.fa-download
|
%i.fa.fa-download
|
||||||
%span Download '#{job.name}'
|
%span Download '#{job.name}'
|
||||||
|
|
|
@ -33,7 +33,11 @@ feature 'Download buttons in branches page', feature: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'shows download artifacts button' do
|
scenario 'shows download artifacts button' do
|
||||||
expect(page).to have_link "Download '#{build.name}'"
|
href = latest_succeeded_namespace_project_artifacts_path(
|
||||||
|
project.namespace, project, 'binary-encoding/download',
|
||||||
|
job: 'build')
|
||||||
|
|
||||||
|
expect(page).to have_link "Download '#{build.name}'", href: href
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,7 +34,11 @@ feature 'Download buttons in files tree', feature: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'shows download artifacts button' do
|
scenario 'shows download artifacts button' do
|
||||||
expect(page).to have_link "Download '#{build.name}'"
|
href = latest_succeeded_namespace_project_artifacts_path(
|
||||||
|
project.namespace, project, "#{project.default_branch}/download",
|
||||||
|
job: 'build')
|
||||||
|
|
||||||
|
expect(page).to have_link "Download '#{build.name}'", href: href
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,7 +33,11 @@ feature 'Download buttons in project main page', feature: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'shows download artifacts button' do
|
scenario 'shows download artifacts button' do
|
||||||
expect(page).to have_link "Download '#{build.name}'"
|
href = latest_succeeded_namespace_project_artifacts_path(
|
||||||
|
project.namespace, project, "#{project.default_branch}/download",
|
||||||
|
job: 'build')
|
||||||
|
|
||||||
|
expect(page).to have_link "Download '#{build.name}'", href: href
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,7 +34,11 @@ feature 'Download buttons in tags page', feature: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'shows download artifacts button' do
|
scenario 'shows download artifacts button' do
|
||||||
expect(page).to have_link "Download '#{build.name}'"
|
href = latest_succeeded_namespace_project_artifacts_path(
|
||||||
|
project.namespace, project, "#{tag}/download",
|
||||||
|
job: 'build')
|
||||||
|
|
||||||
|
expect(page).to have_link "Download '#{build.name}'", href: href
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue