Simplify oidc_user factory

Now you can build in memory only as well.
This commit is contained in:
Maikel Linke
2024-02-20 11:02:14 +11:00
parent 4d8bb25f86
commit 008e384f14

View File

@@ -39,9 +39,9 @@ FactoryBot.define do
end
factory :oidc_user do
after(:create) do |user|
OidcAccount.create!(user:, provider: "openid_connect", uid: user.email)
end
oidc_account {
OidcAccount.new(provider: "openid_connect", uid: email)
}
end
end
end