1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-02 13:15:27 +00:00

Put finals in same round

This commit is contained in:
2015-12-07 15:24:42 +00:00
parent 5a09c60a41
commit d28e95ed31
4 changed files with 28 additions and 11 deletions

View File

@@ -248,5 +248,13 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
matches = @tournament.matches.order(:bout_number)
assert_equal 'Mat1', matches.first.mat.name
end
test "finals matches in last round" do
lastRound = @tournament.totalRounds
finalsMatches = @tournament.matches.select{|m| m.bracket_position == "1/2" || m.bracket_position == "3/4" || m.bracket_position == "5/6" || m.bracket_position == "7/8"}
finalsMatches.each do |m|
assert_equal lastRound, m.round
end
end
end