2017-01-27 08:17:03 +00:00
|
|
|
FactoryGirl.define do
|
|
|
|
sequence :email do |n|
|
|
|
|
"nicole.braun#{n}@zammad.org"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
FactoryGirl.define do
|
|
|
|
|
|
|
|
factory :user do
|
|
|
|
login 'nicole.braun'
|
|
|
|
firstname 'Nicole'
|
|
|
|
lastname 'Braun'
|
|
|
|
email { generate(:email) }
|
|
|
|
password 'zammad'
|
|
|
|
active true
|
2017-02-24 17:27:27 +00:00
|
|
|
login_failed 0
|
2017-01-27 08:17:03 +00:00
|
|
|
updated_by_id 1
|
|
|
|
created_by_id 1
|
|
|
|
end
|
|
|
|
|
2017-05-02 11:37:20 +00:00
|
|
|
factory :customer_user, parent: :user do
|
|
|
|
role_ids { Role.signup_role_ids.sort }
|
|
|
|
end
|
|
|
|
|
2017-02-24 17:27:27 +00:00
|
|
|
factory :user_login_failed, parent: :user do
|
|
|
|
login_failed { (Setting.get('password_max_login_failed').to_i || 10) + 1 }
|
|
|
|
end
|
2017-01-27 08:17:03 +00:00
|
|
|
end
|