Commit 0e4f747b authored by Nick Thomas's avatar Nick Thomas

CE->EE merge: fix conflicts to get specs runnable again

parent 866b3ff6
FactoryGirl.define do
factory :board do
<<<<<<< HEAD
sequence(:name) { |n| "board#{n}" }
=======
>>>>>>> ce/master
project
after(:create) do |board|
......
......@@ -9,11 +9,7 @@ FactoryGirl.define do
end
trait :forked_to_empty_project do
<<<<<<< HEAD
association :forked_to_project, factory: :project
=======
association :forked_to_project, factory: [:project, :repository]
>>>>>>> ce/master
end
end
end
......@@ -14,10 +14,7 @@ FactoryGirl.define do
trait :closed do
state :closed
<<<<<<< HEAD
closed_at Time.now
=======
>>>>>>> ce/master
end
factory :closed_issue, traits: [:closed]
......
......@@ -113,7 +113,6 @@ FactoryGirl.define do
# We delete hooks so that gitlab-shell will not try to authenticate with
# an API that isn't running
FileUtils.rm_r(File.join(project.repository_storage_path, "#{project.disk_path}.git", 'hooks'))
<<<<<<< HEAD
end
end
......@@ -125,8 +124,6 @@ FactoryGirl.define do
after(:create) do |project, evaluator|
project.remote_mirrors.create!(url: evaluator.url, enabled: evaluator.enabled)
=======
>>>>>>> ce/master
end
end
......
......@@ -4,15 +4,12 @@ FactoryGirl.define do
project
transient do
<<<<<<< HEAD
# EE
authorize_user_to_push nil
authorize_user_to_merge nil
authorize_group_to_push nil
authorize_group_to_merge nil
=======
>>>>>>> ce/master
default_push_level true
default_merge_level true
default_access_level true
......@@ -59,7 +56,6 @@ FactoryGirl.define do
end
after(:build) do |protected_branch, evaluator|
<<<<<<< HEAD
# EE
if user = evaluator.authorize_user_to_push
protected_branch.push_access_levels.new(user: user)
......@@ -75,22 +71,17 @@ FactoryGirl.define do
end
next unless protected_branch.merge_access_levels.empty?
=======
>>>>>>> ce/master
if evaluator.default_access_level && evaluator.default_push_level
protected_branch.push_access_levels.new(access_level: Gitlab::Access::MASTER)
end
if evaluator.default_access_level && evaluator.default_merge_level
protected_branch.merge_access_levels.new(access_level: Gitlab::Access::MASTER)
<<<<<<< HEAD
=======
end
end
trait :no_one_can_merge do
after(:create) do |protected_branch|
protected_branch.merge_access_levels.first.update!(access_level: Gitlab::Access::NO_ACCESS)
>>>>>>> ce/master
end
end
end
......
......@@ -4,13 +4,10 @@ FactoryGirl.define do
project
transient do
<<<<<<< HEAD
# EE
authorize_user_to_create nil
authorize_group_to_create nil
=======
>>>>>>> ce/master
default_access_level true
end
......@@ -45,7 +42,6 @@ FactoryGirl.define do
end
after(:build) do |protected_tag, evaluator|
<<<<<<< HEAD
# EE
if evaluator.authorize_user_to_create
protected_tag.create_access_levels.new(user: evaluator.authorize_user_to_create)
......@@ -54,8 +50,6 @@ FactoryGirl.define do
protected_tag.create_access_levels.new(group: evaluator.authorize_group_to_create)
end
=======
>>>>>>> ce/master
if evaluator.default_access_level
protected_tag.create_access_levels.new(access_level: Gitlab::Access::MASTER)
end
......
......@@ -59,12 +59,12 @@ RSpec.configure do |config|
config.include Gitlab::Routing, type: :routing
config.include MigrationsHelpers, :migration
config.include StubFeatureFlags
<<<<<<< HEAD
config.include StubENV
# EE only
config.include EE::LicenseHelpers
config.include Rails.application.routes.url_helpers, type: :routing
=======
config.include StubENV
>>>>>>> ce/master
config.infer_spec_type_from_file_location!
......
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