From 3db2f327594e134729a0ca2f48a748bb28ab7d6c Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Thu, 5 Jul 2018 06:32:05 +0000 Subject: Enable Capybara/FeatureMethods cop --- .../projects/branches/download_buttons_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'spec/features/projects/branches/download_buttons_spec.rb') 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 -- cgit v1.2.3