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
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