Sha256: def2bc0cb884063bed1fe535d5948ba9f725fca5c1324314073d4e6fa2e56576
Contents?: true
Size: 397 Bytes
Versions: 3
Compression:
Stored size: 397 Bytes
Contents
FactoryBot.define do factory :profile, :class => Profile do |f| f.user_group_id {UserGroup.first.id} f.required_role_id {Role.where(name: 'User').first.id} f.sequence(:user_number){|n| "user_number_#{n}"} f.library_id { 2 } f.locale { 'ja' } after(:create) do |profile| user = FactoryBot.create(:user) profile.user = user profile.save end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
enju_message-0.3.1 | spec/factories/profile.rb |
enju_message-0.3.0 | spec/factories/profile.rb |
enju_message-0.3.0.rc.1 | spec/factories/profile.rb |