Commit e681c380 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ce-move-ee-specific-factories-to-ee-spec' into 'master'

Refactor spec/factories/users.rb to allow EE to extend it

See merge request gitlab-org/gitlab-ce!25258
parents 61b606a8 9dca7569
......@@ -73,11 +73,16 @@ FactoryBot.define do
end
after(:create) do |user, evaluator|
user.identities << create(
:identity,
identity_attrs = {
provider: evaluator.provider,
extern_uid: evaluator.extern_uid
)
}
if evaluator.respond_to?(:saml_provider)
identity_attrs[:saml_provider] = evaluator.saml_provider
end
user.identities << create(:identity, identity_attrs)
end
end
......
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