Sha256: de76ef6307b33a288b3af3b033dd3c4eccb09a33725ccc3a369a354e539cd5ed
Contents?: true
Size: 682 Bytes
Versions: 2
Compression:
Stored size: 682 Bytes
Contents
FactoryGirl.define do factory :profile, class: Profile do |f| f.user_group_id { UserGroup.first.id } f.required_role_id { Role.find_by(name: 'User').id } f.sequence(:user_number) { |n| "user_number_#{n}" } f.library_id { Library.find_by(name: 'kamata').id } f.locale 'ja' factory :librarian_profile, class: Profile do |profile| profile.required_role_id { Role.find_by(name: 'Librarian').id } profile.association :user, factory: :librarian end factory :admin_profile, class: Profile do |profile| profile.required_role_id { Role.find_by(name: 'Administrator').id } profile.association :user, factory: :admin end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
enju_seed-0.3.0.beta.4 | spec/factories/profile.rb |
enju_seed-0.3.0.beta.3 | spec/factories/profile.rb |