diff --git a/spec/factories/tournaments.rb b/spec/factories/tournaments.rb index 6d7098e..626a552 100644 --- a/spec/factories/tournaments.rb +++ b/spec/factories/tournaments.rb @@ -34,6 +34,12 @@ FactoryBot.define do match_count: -1, match_type: evaluator.stage_count ? :running_playoff_match : :empty_prepared_playoff_match ) + tournament.stages.each do |stage| + stage.matches.each_with_index do |match, i| + match.position = i + match.save! + end + end end end