Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-07-05 09:32:05 +0300
committerRémy Coutable <remy@rymai.me>2018-07-05 09:32:05 +0300
commit3db2f327594e134729a0ca2f48a748bb28ab7d6c (patch)
tree661033b988897aaf506c0deaf457c2002e17d51b /spec/features/projects/show
parentbaab4cddb091c0aa9649fecc340b8b343747ba83 (diff)
Enable Capybara/FeatureMethods cop
Diffstat (limited to 'spec/features/projects/show')
-rw-r--r--spec/features/projects/show/developer_views_empty_project_instructions_spec.rb14
-rw-r--r--spec/features/projects/show/download_buttons_spec.rb20
-rw-r--r--spec/features/projects/show/no_password_spec.rb2
-rw-r--r--spec/features/projects/show/rss_spec.rb2
4 files changed, 19 insertions, 19 deletions
diff --git a/spec/features/projects/show/developer_views_empty_project_instructions_spec.rb b/spec/features/projects/show/developer_views_empty_project_instructions_spec.rb
index 8803b5222be..227bdf524fe 100644
--- a/spec/features/projects/show/developer_views_empty_project_instructions_spec.rb
+++ b/spec/features/projects/show/developer_views_empty_project_instructions_spec.rb
@@ -1,23 +1,23 @@
require 'rails_helper'
-feature 'Projects > Show > Developer views empty project instructions' do
+describe 'Projects > Show > Developer views empty project instructions' do
let(:project) { create(:project, :empty_repo) }
let(:developer) { create(:user) }
- background do
+ before do
project.add_developer(developer)
sign_in(developer)
end
context 'without an SSH key' do
- scenario 'defaults to HTTP' do
+ it 'defaults to HTTP' do
visit_project
expect_instructions_for('http')
end
- scenario 'switches to SSH', :js do
+ it 'switches to SSH', :js do
visit_project
select_protocol('SSH')
@@ -27,17 +27,17 @@ feature 'Projects > Show > Developer views empty project instructions' do
end
context 'with an SSH key' do
- background do
+ before do
create(:personal_key, user: developer)
end
- scenario 'defaults to SSH' do
+ it 'defaults to SSH' do
visit_project
expect_instructions_for('ssh')
end
- scenario 'switches to HTTP', :js do
+ it 'switches to HTTP', :js do
visit_project
select_protocol('HTTP')
diff --git a/spec/features/projects/show/download_buttons_spec.rb b/spec/features/projects/show/download_buttons_spec.rb
index 254affd4a94..3a2dcc5aa55 100644
--- a/spec/features/projects/show/download_buttons_spec.rb
+++ b/spec/features/projects/show/download_buttons_spec.rb
@@ -1,12 +1,12 @@
require 'spec_helper'
-feature 'Projects > Show > Download buttons' do
- given(:user) { create(:user) }
- given(:role) { :developer }
- given(:status) { 'success' }
- given(:project) { create(:project, :repository) }
+describe 'Projects > Show > Download buttons' 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.sha,
@@ -14,14 +14,14 @@ feature 'Projects > Show > Download buttons' 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,13 +32,13 @@ feature 'Projects > Show > Download buttons' do
visit project_path(project)
end
- scenario 'shows download artifacts button' do
+ it 'shows download artifacts button' do
href = latest_succeeded_project_artifacts_path(project, "#{project.default_branch}/download", job: 'build')
expect(page).to have_link "Download '#{build.name}'", href: href
end
- scenario 'download links have download attribute' do
+ it 'download links have download attribute' do
expect(page).to have_selector('a', text: 'Download')
page.all('a', text: 'Download').each do |link|
expect(link[:download]).to eq ''
diff --git a/spec/features/projects/show/no_password_spec.rb b/spec/features/projects/show/no_password_spec.rb
index b3b3212556c..8259d482fd9 100644
--- a/spec/features/projects/show/no_password_spec.rb
+++ b/spec/features/projects/show/no_password_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'No Password Alert' do
+describe 'No Password Alert' do
let(:project) { create(:project, :repository, namespace: user.namespace) }
context 'with internal auth enabled' do
diff --git a/spec/features/projects/show/rss_spec.rb b/spec/features/projects/show/rss_spec.rb
index 52164d30c40..4d9135b9677 100644
--- a/spec/features/projects/show/rss_spec.rb
+++ b/spec/features/projects/show/rss_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Projects > Show > RSS' do
+describe 'Projects > Show > RSS' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
let(:path) { project_path(project) }