2012-01-30 20:39:34 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2011-11-22 19:21:09 +00:00
|
|
|
Factory.define(:user) do |u|
|
|
|
|
u.email { Factory.next(:email) }
|
|
|
|
u.name { Factory.next(:string) }
|
|
|
|
u.uname { Factory.next(:uname) }
|
|
|
|
u.password '123456'
|
|
|
|
u.password_confirmation { |user| user.password }
|
|
|
|
end
|
|
|
|
|
|
|
|
Factory.define(:admin, :class => 'User') do |u|
|
|
|
|
u.email { Factory.next(:email) }
|
|
|
|
u.name { Factory.next(:string) }
|
|
|
|
u.uname { Factory.next(:uname) }
|
|
|
|
u.password '123456'
|
|
|
|
u.password_confirmation { |user| user.password }
|
|
|
|
u.role 'admin'
|
2012-01-30 20:39:34 +00:00
|
|
|
end
|