Fix rubocop warnings in features

This commit is contained in:
Guilherme Garnier 2015-10-03 19:59:54 -05:00
parent aed145a9c6
commit 963e6366be
6 changed files with 33 additions and 35 deletions

View file

@ -282,9 +282,9 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
milestone1_project2 = create :milestone,
title: "Version 7.2",
project: project2
milestone1_project3 = create :milestone,
title: "Version 7.2",
project: @project3
create :milestone,
title: "Version 7.2",
project: @project3
milestone2_project1 = create :milestone,
title: "GL-113",
project: @project1
@ -301,28 +301,28 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
assignee: current_user,
author: current_user,
milestone: milestone2_project1
issue2 = create :issue,
project: project2,
assignee: current_user,
author: current_user,
milestone: milestone1_project2
issue3 = create :issue,
project: @project3,
assignee: current_user,
author: current_user,
milestone: milestone1_project1
mr1 = create :merge_request,
source_project: @project1,
target_project: @project1,
assignee: current_user,
author: current_user,
milestone: milestone2_project1
mr2 = create :merge_request,
source_project: project2,
target_project: project2,
assignee: current_user,
author: current_user,
milestone: milestone2_project2
create :issue,
project: project2,
assignee: current_user,
author: current_user,
milestone: milestone1_project2
create :issue,
project: @project3,
assignee: current_user,
author: current_user,
milestone: milestone1_project1
create :merge_request,
source_project: @project1,
target_project: @project1,
assignee: current_user,
author: current_user,
milestone: milestone2_project1
create :merge_request,
source_project: project2,
target_project: project2,
assignee: current_user,
author: current_user,
milestone: milestone2_project2
@mr3 = create :merge_request,
source_project: @project3,
target_project: @project3,

View file

@ -32,6 +32,6 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
end
def project
project ||= Project.find_by(name: "Shop")
@project ||= Project.find_by(name: "Shop")
end
end

View file

@ -223,11 +223,11 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'project \'Shop\' has issue \'Bugfix1\' with description: \'Description for issue1\'' do
issue = create(:issue, title: 'Bugfix1', description: 'Description for issue1', project: project)
create(:issue, title: 'Bugfix1', description: 'Description for issue1', project: project)
end
step 'project \'Shop\' has issue \'Feature1\' with description: \'Feature submitted for issue1\'' do
issue = create(:issue, title: 'Feature1', description: 'Feature submitted for issue1', project: project)
create(:issue, title: 'Feature1', description: 'Feature submitted for issue1', project: project)
end
step 'I fill in issue search with \'Description for issue1\'' do

View file

@ -39,7 +39,6 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
step 'Authenticate' do
admin = create(:admin)
project = Project.find_by(name: 'Community')
fill_in "user_login", with: admin.email
fill_in "user_password", with: admin.password
click_button "Sign in"
@ -54,7 +53,6 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
step 'I get redirected to signin page where I sign in' do
admin = create(:admin)
project = Project.find_by(name: 'Enterprise')
fill_in "user_login", with: admin.email
fill_in "user_password", with: admin.password
click_button "Sign in"

View file

@ -37,7 +37,7 @@ module SharedGroup
group = Group.find_by(name: groupname) || create(:group, name: groupname)
group.add_user(user, role)
project ||= create(:project, namespace: group, path: "project#{@project_count}")
event ||= create(:closed_issue_event, project: project)
create(:closed_issue_event, project: project)
project.team << [user, :master]
@project_count += 1
end

View file

@ -21,10 +21,10 @@ describe "Admin Builds" do
describe "Tabs" do
it "shows all builds" do
build = FactoryGirl.create :ci_build, commit: commit, status: "pending"
build1 = FactoryGirl.create :ci_build, commit: commit, status: "running"
build2 = FactoryGirl.create :ci_build, commit: commit, status: "success"
build3 = FactoryGirl.create :ci_build, commit: commit, status: "failed"
FactoryGirl.create :ci_build, commit: commit, status: "pending"
FactoryGirl.create :ci_build, commit: commit, status: "running"
FactoryGirl.create :ci_build, commit: commit, status: "success"
FactoryGirl.create :ci_build, commit: commit, status: "failed"
visit ci_admin_builds_path