2012-03-29 21:34:22 +01:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :user do
|
|
|
|
email { FactoryGirl.generate(:email) }
|
|
|
|
name { FactoryGirl.generate(:string) }
|
|
|
|
uname { FactoryGirl.generate(:uname) }
|
|
|
|
password '123456'
|
|
|
|
password_confirmation {|u| u.password}
|
2012-03-31 00:37:54 +01:00
|
|
|
confirmed_at { Time.now.utc }
|
2013-06-27 20:43:44 +01:00
|
|
|
after(:create) { |u| u.send(:new_user_notification) }
|
2012-03-29 21:34:22 +01:00
|
|
|
end
|
2011-11-22 19:21:09 +00:00
|
|
|
|
2014-01-21 04:51:49 +00:00
|
|
|
factory :admin, parent: :user do
|
2012-03-29 21:34:22 +01:00
|
|
|
role 'admin'
|
|
|
|
end
|
2014-04-17 21:18:24 +01:00
|
|
|
|
|
|
|
factory :system_user, parent: :user do
|
|
|
|
role 'system'
|
|
|
|
end
|
2012-01-30 20:39:34 +00:00
|
|
|
end
|