Sha256: d371605ec9235bc15ccb616fa717334d3a1cf4c44a4a9d52748fc89ee1805f9b
Contents?: true
Size: 464 Bytes
Versions: 22
Compression:
Stored size: 464 Bytes
Contents
FactoryBot.define do factory :user_role, class: 'Mks::Auth::UserRole' do name { FFaker::Name.name } association :application_module trait :with_menu do after(:create) do |role| role.menus << create(:menu, text: 'menu1') end end trait :with_menus do after(:create) do |role| role.menus = [create(:menu, text: 'menu1'), create(:menu, text: 'menu2'), create(:menu, text: 'menu3')] end end end end
Version data entries
22 entries across 22 versions & 5 rubygems