diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 15:06:41 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 15:06:41 +0000 |
commit | 083d64c6468a070ae7b0b406ead8d87da27d1d22 (patch) | |
tree | ba92a9b5b6418f805ede9ef05b371d82d2c1d27d /spec/support/shared_examples/features | |
parent | 0be510a49f6e4f8e27b19b707fd1dac61571f78f (diff) | |
download | gitlab-ce-083d64c6468a070ae7b0b406ead8d87da27d1d22.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/features')
-rw-r--r-- | spec/support/shared_examples/features/archive_download_buttons_shared_examples.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/support/shared_examples/features/archive_download_buttons_shared_examples.rb b/spec/support/shared_examples/features/archive_download_buttons_shared_examples.rb index 920fcbde483..21c32c9c04a 100644 --- a/spec/support/shared_examples/features/archive_download_buttons_shared_examples.rb +++ b/spec/support/shared_examples/features/archive_download_buttons_shared_examples.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true shared_examples 'archive download buttons' do - let(:formats) { %w(zip tar.gz tar.bz2 tar) } let(:path_to_visit) { project_path(project) } let(:ref) { project.default_branch } @@ -13,7 +12,7 @@ shared_examples 'archive download buttons' do context 'private project' do it 'shows archive download buttons with external storage URL prepended and user token appended to their href' do - formats.each do |format| + Gitlab::Workhorse::ARCHIVE_FORMATS.each do |format| path = archive_path(project, ref, format) uri = URI('https://cdn.gitlab.com') uri.path = path @@ -28,7 +27,7 @@ shared_examples 'archive download buttons' do let(:project) { create(:project, :repository, :public) } it 'shows archive download buttons with external storage URL prepended to their href' do - formats.each do |format| + Gitlab::Workhorse::ARCHIVE_FORMATS.each do |format| path = archive_path(project, ref, format) uri = URI('https://cdn.gitlab.com') uri.path = path @@ -45,7 +44,7 @@ shared_examples 'archive download buttons' do end it 'shows default archive download buttons' do - formats.each do |format| + Gitlab::Workhorse::ARCHIVE_FORMATS.each do |format| path = archive_path(project, ref, format) expect(page).to have_link format, href: path |