Add default for playoff_teams_amount to tournament factory
This commit is contained in:
parent
f04c11427a
commit
36bdfbae28
|
|
@ -10,6 +10,7 @@ FactoryBot.define do
|
|||
end
|
||||
after(:create) do |tournament, evaluator|
|
||||
tournament.teams = create_list(:team, evaluator.teams_count, tournament: tournament)
|
||||
tournament.playoff_teams_amount = (tournament.teams.size / 2)
|
||||
end
|
||||
|
||||
factory :stage_tournament do
|
||||
|
|
|
|||
Loading…
Reference in New Issue