demarches-normaliennes/spec/factories/gestionnaire.rb
2018-11-13 10:41:45 +01:00

13 lines
350 B
Ruby

FactoryBot.define do
sequence(:gestionnaire_email) { |n| "gest#{n}@gest.com" }
factory :gestionnaire do
email { generate(:gestionnaire_email) }
password { 'password' }
end
trait :with_trusted_device do
after(:create) do |gestionnaire|
gestionnaire.update(features: { "enable_email_login_token" => true })
end
end
end