Sha256: 9d2d0e4039f7a1c9598ebd3e4954f6a647fc7b251679e29ec8a5bb3aa5d575a0
Contents?: true
Size: 993 Bytes
Versions: 9
Compression:
Stored size: 993 Bytes
Contents
FactoryGirl.define do factory :admin, :class => User do |f| f.sequence(:username){|n| "admin_#{n}"} f.sequence(:email){|n| "admin_#{n}@example.jp"} f.email_confirmation{|u| u.email} f.role {Role.find_by_name('Administrator')} f.password 'adminpassword' f.password_confirmation 'adminpassword' end factory :librarian, :class => User do |f| f.sequence(:username){|n| "librarian_#{n}"} f.sequence(:email){|n| "librarian_#{n}@example.jp"} f.email_confirmation{|u| u.email} f.role {Role.find_by_name('Librarian')} f.password 'librarianpassword' f.password_confirmation 'librarianpassword' end factory :user, :class => User do |f| f.sequence(:username){|n| "user_#{n}"} f.sequence(:email){|n| "user_#{n}@example.jp"} f.email_confirmation{|u| u.email} f.role {Role.find_by_name('User')} f.password 'userpassword' f.password_confirmation 'userpassword' end factory :invalid_user, :class => User do |f| end end
Version data entries
9 entries across 9 versions & 1 rubygems