mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 16:09:52 +01:00
ea0685136e
haha regexp go brrr special thanks to @seatsea for helping me out with the French locales
18 lines
436 B
Ruby
18 lines
436 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :list do
|
|
sequence(:display_name) { |i| "#{Faker::Internet.username(specifier: 0..12, separators: %w[_])}#{i}" }
|
|
user { FactoryBot.build(:user) }
|
|
|
|
transient do
|
|
members { [] }
|
|
end
|
|
|
|
after(:create) do |list, evaluator|
|
|
evaluator.members.each do |member|
|
|
ListMember.create(list_id: list.id, user_id: member.id)
|
|
end
|
|
end
|
|
end
|
|
end
|