1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-10 15:50:50 +00:00

WIP 64 man

This commit is contained in:
2025-07-11 18:28:22 -04:00
parent 53e16952bf
commit 28da6c84df
16 changed files with 1141 additions and 317 deletions

View File

@@ -85,17 +85,17 @@ class DoubleEliminationEightManMatchGeneration < ActionDispatch::IntegrationTest
assert wrestler2.reload.placement_points == 3
end
test "Run through all matches works" do
@tournament.matches.sort_by{ |match| match.bout_number }.each do |match|
match.reload
if match.finished != 1 and match.w1 and match.w2
match.winner_id = match.w1
match.win_type = "Decision"
match.score = "0-0"
match.finished = 1
match.save
end
end
assert @tournament.matches.reload.select{|m| m.finished == 0}.count == 0
end
# test "Run through all matches works" do
# @tournament.matches.sort_by{ |match| match.bout_number }.each do |match|
# match.reload
# if match.finished != 1 and match.w1 and match.w2
# match.winner_id = match.w1
# match.win_type = "Decision"
# match.score = "0-0"
# match.finished = 1
# match.save
# end
# end
# assert @tournament.matches.reload.select{|m| m.finished == 0}.count == 0
# end
end