1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/factories/contact_lists.rb

17 lines
412 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :empty_contact_list, class: ContactList
factory :some_contact_list, parent: :empty_contact_list do
transient do
contacts_count { rand 1..5 }
end
after :create do |contact_list, evaluator|
create_list :some_contact,
evaluator.contacts_count,
contact_list: contact_list
end
end
end