summaryrefslogtreecommitdiff
path: root/spec/features/projects/branches
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-07-05 06:32:05 +0000
committerRémy Coutable <remy@rymai.me>2018-07-05 06:32:05 +0000
commit3db2f327594e134729a0ca2f48a748bb28ab7d6c (patch)
tree661033b988897aaf506c0deaf457c2002e17d51b /spec/features/projects/branches
parentbaab4cddb091c0aa9649fecc340b8b343747ba83 (diff)
downloadgitlab-ce-3db2f327594e134729a0ca2f48a748bb28ab7d6c.tar.gz
Enable Capybara/FeatureMethods cop
Diffstat (limited to 'spec/features/projects/branches')
-rw-r--r--spec/features/projects/branches/download_buttons_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/features/projects/branches/download_buttons_spec.rb b/spec/features/projects/branches/download_buttons_spec.rb
index 605298ba8ab..c8dc72a34ec 100644
--- a/spec/features/projects/branches/download_buttons_spec.rb
+++ b/spec/features/projects/branches/download_buttons_spec.rb
@@ -1,12 +1,12 @@
require 'spec_helper'
-feature 'Download buttons in branches page' do
- given(:user) { create(:user) }
- given(:role) { :developer }
- given(:status) { 'success' }
- given(:project) { create(:project, :repository) }
+describe 'Download buttons in branches page' do
+ let(:user) { create(:user) }
+ let(:role) { :developer }
+ let(:status) { 'success' }
+ let(:project) { create(:project, :repository) }
- given(:pipeline) do
+ let(:pipeline) do
create(:ci_pipeline,
project: project,
sha: project.commit('binary-encoding').sha,
@@ -14,14 +14,14 @@ feature 'Download buttons in branches page' do
status: status)
end
- given!(:build) do
+ let!(:build) do
create(:ci_build, :success, :artifacts,
pipeline: pipeline,
status: pipeline.status,
name: 'build')
end
- background do
+ before do
sign_in(user)
project.add_role(user, role)
end
@@ -32,7 +32,7 @@ feature 'Download buttons in branches page' do
visit project_branches_filtered_path(project, state: 'all', search: 'binary-encoding')
end
- scenario 'shows download artifacts button' do
+ it 'shows download artifacts button' do
href = latest_succeeded_project_artifacts_path(project, 'binary-encoding/download', job: 'build')
expect(page).to have_link "Download '#{build.name}'", href: href