Commit 963e6366 authored by Guilherme Garnier's avatar Guilherme Garnier

Fix rubocop warnings in features

parent aed145a9
...@@ -282,9 +282,9 @@ class Spinach::Features::Groups < Spinach::FeatureSteps ...@@ -282,9 +282,9 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
milestone1_project2 = create :milestone, milestone1_project2 = create :milestone,
title: "Version 7.2", title: "Version 7.2",
project: project2 project: project2
milestone1_project3 = create :milestone, create :milestone,
title: "Version 7.2", title: "Version 7.2",
project: @project3 project: @project3
milestone2_project1 = create :milestone, milestone2_project1 = create :milestone,
title: "GL-113", title: "GL-113",
project: @project1 project: @project1
...@@ -301,28 +301,28 @@ class Spinach::Features::Groups < Spinach::FeatureSteps ...@@ -301,28 +301,28 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
assignee: current_user, assignee: current_user,
author: current_user, author: current_user,
milestone: milestone2_project1 milestone: milestone2_project1
issue2 = create :issue, create :issue,
project: project2, project: project2,
assignee: current_user, assignee: current_user,
author: current_user, author: current_user,
milestone: milestone1_project2 milestone: milestone1_project2
issue3 = create :issue, create :issue,
project: @project3, project: @project3,
assignee: current_user, assignee: current_user,
author: current_user, author: current_user,
milestone: milestone1_project1 milestone: milestone1_project1
mr1 = create :merge_request, create :merge_request,
source_project: @project1, source_project: @project1,
target_project: @project1, target_project: @project1,
assignee: current_user, assignee: current_user,
author: current_user, author: current_user,
milestone: milestone2_project1 milestone: milestone2_project1
mr2 = create :merge_request, create :merge_request,
source_project: project2, source_project: project2,
target_project: project2, target_project: project2,
assignee: current_user, assignee: current_user,
author: current_user, author: current_user,
milestone: milestone2_project2 milestone: milestone2_project2
@mr3 = create :merge_request, @mr3 = create :merge_request,
source_project: @project3, source_project: @project3,
target_project: @project3, target_project: @project3,
......
...@@ -32,6 +32,6 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps ...@@ -32,6 +32,6 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
end end
def project def project
project ||= Project.find_by(name: "Shop") @project ||= Project.find_by(name: "Shop")
end end
end end
...@@ -223,11 +223,11 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps ...@@ -223,11 +223,11 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end end
step 'project \'Shop\' has issue \'Bugfix1\' with description: \'Description for issue1\'' do 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 end
step 'project \'Shop\' has issue \'Feature1\' with description: \'Feature submitted for issue1\'' do 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 end
step 'I fill in issue search with \'Description for issue1\'' do step 'I fill in issue search with \'Description for issue1\'' do
......
...@@ -39,7 +39,6 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps ...@@ -39,7 +39,6 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
step 'Authenticate' do step 'Authenticate' do
admin = create(:admin) admin = create(:admin)
project = Project.find_by(name: 'Community')
fill_in "user_login", with: admin.email fill_in "user_login", with: admin.email
fill_in "user_password", with: admin.password fill_in "user_password", with: admin.password
click_button "Sign in" click_button "Sign in"
...@@ -54,7 +53,6 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps ...@@ -54,7 +53,6 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
step 'I get redirected to signin page where I sign in' do step 'I get redirected to signin page where I sign in' do
admin = create(:admin) admin = create(:admin)
project = Project.find_by(name: 'Enterprise')
fill_in "user_login", with: admin.email fill_in "user_login", with: admin.email
fill_in "user_password", with: admin.password fill_in "user_password", with: admin.password
click_button "Sign in" click_button "Sign in"
......
...@@ -37,7 +37,7 @@ module SharedGroup ...@@ -37,7 +37,7 @@ module SharedGroup
group = Group.find_by(name: groupname) || create(:group, name: groupname) group = Group.find_by(name: groupname) || create(:group, name: groupname)
group.add_user(user, role) group.add_user(user, role)
project ||= create(:project, namespace: group, path: "project#{@project_count}") 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.team << [user, :master]
@project_count += 1 @project_count += 1
end end
......
...@@ -21,10 +21,10 @@ describe "Admin Builds" do ...@@ -21,10 +21,10 @@ describe "Admin Builds" do
describe "Tabs" do describe "Tabs" do
it "shows all builds" do it "shows all builds" do
build = FactoryGirl.create :ci_build, commit: commit, status: "pending" FactoryGirl.create :ci_build, commit: commit, status: "pending"
build1 = FactoryGirl.create :ci_build, commit: commit, status: "running" FactoryGirl.create :ci_build, commit: commit, status: "running"
build2 = FactoryGirl.create :ci_build, commit: commit, status: "success" FactoryGirl.create :ci_build, commit: commit, status: "success"
build3 = FactoryGirl.create :ci_build, commit: commit, status: "failed" FactoryGirl.create :ci_build, commit: commit, status: "failed"
visit ci_admin_builds_path visit ci_admin_builds_path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment