2018-01-23 17:15:42 +01:00
|
|
|
FactoryBot.define do
|
2017-06-01 17:44:56 +02:00
|
|
|
sequence(:user_email) { |n| "user#{n}@user.com" }
|
2015-09-23 10:02:01 +02:00
|
|
|
factory :user do
|
|
|
|
email { generate(:user_email) }
|
2021-10-22 15:15:23 +02:00
|
|
|
password { '{My-$3cure-p4ssWord}' }
|
2018-10-25 15:07:15 +02:00
|
|
|
confirmed_at { Time.zone.now }
|
2018-11-06 11:22:17 +01:00
|
|
|
|
|
|
|
trait :unconfirmed do
|
|
|
|
confirmed_at { nil }
|
|
|
|
end
|
2020-09-18 09:57:26 +02:00
|
|
|
|
|
|
|
trait :with_strong_password do
|
|
|
|
password { '{my-%s3cure[]-p4$$w0rd' }
|
|
|
|
end
|
2024-03-05 11:15:54 +01:00
|
|
|
|
|
|
|
trait :with_fci do
|
2024-03-05 14:00:54 +01:00
|
|
|
france_connect_informations { [association(:france_connect_information)] }
|
2024-03-05 11:15:54 +01:00
|
|
|
end
|
2024-06-25 15:56:37 +02:00
|
|
|
|
|
|
|
trait :with_email_verified do
|
|
|
|
email_verified_at { Time.zone.now }
|
|
|
|
end
|
2015-09-23 10:02:01 +02:00
|
|
|
end
|
2017-04-04 15:27:04 +02:00
|
|
|
end
|