2012-01-30 20:39:34 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
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}
|
|
|
|
confirmed_at { Time.current }
|
|
|
|
end
|
2011-11-22 19:21:09 +00:00
|
|
|
|
2012-03-29 21:34:22 +01:00
|
|
|
factory :admin, :parent => :user do
|
|
|
|
role 'admin'
|
|
|
|
end
|
2012-01-30 20:39:34 +00:00
|
|
|
end
|