Sha256: 687261e1f72477f7ab5ce5b20ac3688df9552190745384ae079f851a4d1d18cd

Contents?: true

Size: 653 Bytes

Versions: 26

Compression:

Stored size: 653 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" }
    factory :librarian_profile, class: Profile do |profile|
      profile.required_role_id {Role.where(name: 'Librarian').first.id}
      profile.association :user, factory: :librarian
    end
    factory :admin_profile, class: Profile do |profile|
      profile.required_role_id {Role.where(name: 'Administrator').first.id}
      profile.association :user, factory: :admin
    end
  end
end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
enju_leaf-1.3.6 spec/factories/profile.rb
enju_seed-0.3.6 spec/factories/profile.rb
enju_leaf-1.3.5 spec/factories/profile.rb
enju_question-0.3.2 spec/factories/profile.rb
enju_leaf-1.3.4 spec/factories/profile.rb
enju_leaf-1.3.4.rc.2 spec/factories/profile.rb
enju_seed-0.3.5 spec/factories/profile.rb
enju_seed-0.4.0.rc.2 spec/factories/profile.rb
enju_leaf-1.3.4.rc.1 spec/factories/profile.rb
enju_seed-0.3.4 spec/factories/profile.rb
enju_seed-0.4.0.rc.1 spec/factories/profile.rb
enju_seed-0.4.0.beta.3 spec/factories/profile.rb
enju_seed-0.4.0.beta.2 spec/factories/profile.rb
enju_leaf-1.3.3.1 spec/factories/profile.rb
enju_leaf-1.3.3 spec/factories/profile.rb
enju_seed-0.3.3 spec/factories/profile.rb
enju_leaf-1.3.2 spec/factories/profile.rb
enju_seed-0.3.2 spec/factories/profile.rb
enju_seed-0.3.1 spec/factories/profile.rb
enju_leaf-1.3.1 spec/factories/profile.rb