Sha256: 3fa96cc5d0a98fea49910bccfaaa758e328cc9ccc6f90b8dc3efc99e056ebc3e
Contents?: true
Size: 671 Bytes
Versions: 1
Compression:
Stored size: 671 Bytes
Contents
FactoryBot.define do factory :profile, class: Profile do user_group_id { UserGroup.first.id } required_role_id { Role.find_by(name: 'User').id } sequence(:user_number) { |n| "user_number_#{n}" } library_id { Library.find_by(name: 'kamata').id } 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
enju_seed-0.4.0.beta.1 | spec/factories/profile.rb |