Sha256: 3f3529654004486386e85c4c9dcf3132651d0098c7163db2ef4b6a254caffb0a

Contents?: true

Size: 678 Bytes

Versions: 13

Compression:

Stored size: 678 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 { 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

13 entries across 13 versions & 3 rubygems

Version Path
enju_message-0.3.4 spec/factories/profile.rb
enju_message-0.3.3 spec/factories/profile.rb
enju_message-0.4.0.rc.1 spec/factories/profile.rb
enju_library-0.4.0.rc.1 spec/factories/profile.rb
enju_message-0.3.2 spec/factories/profile.rb
enju_library-0.4.0.beta.4 spec/factories/profile.rb
enju_leaf-2.0.0.beta.2 spec/factories/profile.rb
enju_library-0.4.0.beta.3 spec/factories/profile.rb
enju_message-0.4.0.beta.2 spec/factories/profile.rb
enju_library-0.4.0.beta.2 spec/factories/profile.rb
enju_leaf-2.0.0.beta.1 spec/factories/profile.rb
enju_message-0.4.0.beta.1 spec/factories/profile.rb
enju_library-0.4.0.beta.1 spec/factories/profile.rb