1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-02 21:24:25 +00:00

Got stuff working with matches being saved individually.

This commit is contained in:
2015-04-26 15:49:13 -04:00
parent 391e523b2e
commit dd44efa869
12 changed files with 97 additions and 128 deletions

View File

@@ -4,7 +4,7 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
def setup
@tournament = Tournament.find(1)
@tournament.upcomingMatches
@genMatchups = @tournament.generateMatchups
@genMatchups = @tournament.upcomingMatches
end
def createTournament(numberOfWrestlers)
@@ -24,7 +24,6 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
@school3.save
@weight3 = Weight.new
@weight3.id = @id
@weight3.max = 350
@weight3.tournament_id = @id
@weight3.save
until @count > numberOfWrestlers do
@@ -105,13 +104,7 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
@twentysix_matches = @genMatchups.select{|m| m.weight_max == 132}
assert_equal 32, @twentysix_matches.length
end
test "tests serialization for matchups" do
@tournament_saved = Tournament.find(1)
@genMatchup = @genMatchups.select{|m| m.boutNumber == 4000}.first
@matchup = @tournament_saved.upcomingMatches.select{|m| m.boutNumber == 4000}.first
assert_equal @genMatchup.w1_name, @matchup.w1_name
end
test "test if a wrestler can exceed five matches" do
@count = 5