mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Refactored match generation so I can eventually support multiple types of tournaments
This commit is contained in:
@@ -4,10 +4,6 @@ class PoolAdvancementTest < ActionDispatch::IntegrationTest
|
||||
|
||||
def setup
|
||||
tournament = Tournament.find(1)
|
||||
|
||||
# WHY DOES THIS NOT WORK WITHOUT GENERATING MATCHUPS BEFORE EVERY TEST?
|
||||
# FIXTURES FOR MATCHES ARE FILLED OUT AND WORK FOR OTHER TESTS
|
||||
# tournament.generateMatchups
|
||||
end
|
||||
|
||||
def singlePoolNotFinished
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'test_helper'
|
||||
class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
@tournament = Tournament.find(1)
|
||||
@tournament.generateMatchups
|
||||
GenerateTournamentMatches.new(@tournament).generate
|
||||
end
|
||||
|
||||
def createTournament(numberOfWrestlers)
|
||||
@@ -69,7 +69,7 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
def checkForByeInPool(tournament)
|
||||
tournament.generateMatchups
|
||||
GenerateTournamentMatches.new(tournament).generate
|
||||
matchups = tournament.matches
|
||||
tournament.weights.each do |w|
|
||||
w.wrestlers.each do |wr|
|
||||
|
||||
Reference in New Issue
Block a user