Adds :playoff_stage as factory

This commit is contained in:
Daniel Schädler 2019-05-02 09:47:26 +02:00
parent db1518bdbd
commit babc233412
1 changed files with 10 additions and 0 deletions

View File

@ -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