Adds :playoff_stage as factory
This commit is contained in:
parent
db1518bdbd
commit
babc233412
|
|
@ -12,5 +12,15 @@ FactoryBot.define do
|
|||
stage.groups = create_list(:group, evaluator.group_count)
|
||||
end
|
||||
end
|
||||
|
||||
factory :playoff_stage do
|
||||
level { rand(10) }
|
||||
transient do
|
||||
match_count { 4 }
|
||||
end
|
||||
after(:create) do |stage, evaluator|
|
||||
stage.matches = create_list(:match, evaluator.match_count)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue