mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Random seeding now works
This commit is contained in:
5
test/fixtures/mats.yml
vendored
5
test/fixtures/mats.yml
vendored
@@ -11,3 +11,8 @@
|
||||
name: Mat1
|
||||
tournament_id: 1
|
||||
id: 1
|
||||
|
||||
two:
|
||||
name: 1
|
||||
tournament_id: 2
|
||||
id: 2
|
||||
|
||||
4
test/fixtures/schools.yml
vendored
4
test/fixtures/schools.yml
vendored
@@ -10,4 +10,8 @@ two:
|
||||
name: Grove City
|
||||
tournament_id: 1
|
||||
|
||||
three:
|
||||
id: 3
|
||||
name: Central Crossing
|
||||
tournament_id: 2
|
||||
|
||||
|
||||
9
test/fixtures/tournaments.yml
vendored
9
test/fixtures/tournaments.yml
vendored
@@ -9,4 +9,13 @@ one:
|
||||
tournament_type: Pool to bracket
|
||||
user_id: 1
|
||||
|
||||
two:
|
||||
id: 2
|
||||
name: Comet Classic 2
|
||||
address: Some Place
|
||||
director: Jacob Cody Wimer
|
||||
director_email: jacob.wimer@gmail.com
|
||||
tournament_type: Pool to bracket
|
||||
user_id: 1
|
||||
|
||||
|
||||
|
||||
5
test/fixtures/weights.yml
vendored
5
test/fixtures/weights.yml
vendored
@@ -26,4 +26,7 @@ five:
|
||||
tournament_id: 1
|
||||
|
||||
|
||||
|
||||
six:
|
||||
id: 6
|
||||
max: 285
|
||||
tournament_id: 1
|
||||
|
||||
54
test/fixtures/wrestlers.yml
vendored
54
test/fixtures/wrestlers.yml
vendored
@@ -430,4 +430,58 @@ fourtyeight:
|
||||
original_seed: 16
|
||||
season_loss: 2
|
||||
season_win: 50
|
||||
criteria:
|
||||
|
||||
fourtynine:
|
||||
name: Guy38
|
||||
school_id: 1
|
||||
weight_id: 6
|
||||
original_seed: 1
|
||||
season_loss: 2
|
||||
season_win: 50
|
||||
criteria:
|
||||
|
||||
fourtynine:
|
||||
name: Guy39
|
||||
school_id: 1
|
||||
weight_id: 6
|
||||
original_seed: 2
|
||||
season_loss: 2
|
||||
season_win: 50
|
||||
criteria:
|
||||
|
||||
fifty:
|
||||
name: Guy40
|
||||
school_id: 1
|
||||
weight_id: 6
|
||||
original_seed:
|
||||
season_loss: 2
|
||||
season_win: 50
|
||||
criteria:
|
||||
|
||||
fiftyone:
|
||||
name: Guy41
|
||||
school_id: 1
|
||||
weight_id: 6
|
||||
original_seed:
|
||||
season_loss: 2
|
||||
season_win: 50
|
||||
criteria:
|
||||
|
||||
fiftytwo:
|
||||
name: Guy42
|
||||
school_id: 1
|
||||
weight_id: 6
|
||||
original_seed:
|
||||
season_loss: 2
|
||||
season_win: 50
|
||||
criteria:
|
||||
|
||||
fiftythree:
|
||||
name: Guy43
|
||||
school_id: 1
|
||||
weight_id: 6
|
||||
original_seed:
|
||||
season_loss: 2
|
||||
season_win: 50
|
||||
criteria:
|
||||
@@ -536,15 +536,12 @@ class PoolAdvancementTest < ActionDispatch::IntegrationTest
|
||||
assert_equal 12, wrestler.placementPoints
|
||||
end
|
||||
|
||||
test "advancement points fourPoolsToSemi Semis" do
|
||||
test "advancement points fourPoolsToSemi Semis and Conso Semis" do
|
||||
sixteenManToSemi
|
||||
wrestler = Wrestler.where("name = ?", "Guy22").first
|
||||
|
||||
assert_equal 9, wrestler.placementPoints
|
||||
end
|
||||
|
||||
test "advancement points fourPoolsToSemi Conso Semis" do
|
||||
sixteenManToSemi
|
||||
|
||||
wrestler = Wrestler.where("name = ?", "Guy29").first
|
||||
|
||||
assert_equal 3, wrestler.placementPoints
|
||||
|
||||
@@ -256,5 +256,12 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
|
||||
assert_equal lastRound, m.round
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
test "Random seeding works" do
|
||||
weight = Weight.find(6)
|
||||
wrestlersWithoutSeed = weight.wrestlers.select{|w| w.seed == nil }.size
|
||||
|
||||
assert_equal 0, wrestlersWithoutSeed
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user