a2b91c8ec6
This changes: - avoids relying on application code to create mock objects, - allows to build Administrateur or Instructeurs without saving them.
12 lines
294 B
Ruby
12 lines
294 B
Ruby
FactoryBot.define do
|
|
sequence(:create_expert_email) { |n| "expert#{n}@expert.com" }
|
|
|
|
factory :expert do
|
|
user { association :user, email: email, password: password }
|
|
|
|
transient do
|
|
email { generate(:expert_email) }
|
|
password { 'somethingverycomplated!' }
|
|
end
|
|
end
|
|
end
|