Commit c78adba6 authored by Rémy Coutable's avatar Rémy Coutable

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

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent fe10964a
...@@ -73,11 +73,16 @@ FactoryBot.define do ...@@ -73,11 +73,16 @@ FactoryBot.define do
end end
after(:create) do |user, evaluator| after(:create) do |user, evaluator|
user.identities << create( identity_attrs = {
:identity,
provider: evaluator.provider, provider: evaluator.provider,
extern_uid: evaluator.extern_uid 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
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