summaryrefslogtreecommitdiff
path: root/spec/features/projects/files
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-09-19 13:12:45 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-09-19 13:12:45 +0800
commit31e592647aaab8923922a316e442c404ef70b8df (patch)
tree9d9d96486e47ce54f5ebb915f9b0bc15d0d596d0 /spec/features/projects/files
parent1d51bc7dfd04886fa5af69a60bb509691d697813 (diff)
downloadgitlab-ce-31e592647aaab8923922a316e442c404ef70b8df.tar.gz
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.
Diffstat (limited to 'spec/features/projects/files')
-rw-r--r--spec/features/projects/files/download_buttons_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/features/projects/files/download_buttons_spec.rb b/spec/features/projects/files/download_buttons_spec.rb
index be5cebcd7c9..d7c29a7e074 100644
--- a/spec/features/projects/files/download_buttons_spec.rb
+++ b/spec/features/projects/files/download_buttons_spec.rb
@@ -34,7 +34,11 @@ feature 'Download buttons in files tree', feature: true do
end
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