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

Fixed bug in test for quickest pin then fixed bug in quickest pin tie breaker

This commit is contained in:
2015-12-17 14:48:07 +00:00
parent 702a52311b
commit 4bb81417a9
2 changed files with 4 additions and 4 deletions

View File

@@ -177,7 +177,7 @@ class Wrestler < ActiveRecord::Base
end end
def fastestPin def fastestPin
pinWins.sort_by{|m| m.pinTime}.reverse.first pinWins.sort_by{|m| m.pinTime}.first
end end
def seasonWinPercentage def seasonWinPercentage

View File

@@ -131,10 +131,10 @@ class PoolAdvancementTest < ActionDispatch::IntegrationTest
def nineManBracketPoolTwoGuyThreeQuickestPin def nineManBracketPoolTwoGuyThreeQuickestPin
matches = @matches.select{|m| m.weight_id == 3 && m.bracket_position == "Pool"} matches = @matches.select{|m| m.weight_id == 3 && m.bracket_position == "Pool"}
endMatchWithQuickPin(1004,"Guy9",matches) endMatchWithQuickPin(1004,"Guy9",matches)
endMatch(1005,"Guy7",matches) endMatchWithPin(1005,"Guy7",matches)
endMatchWithQuickPin(2004,"Guy3",matches) endMatchWithQuickPin(2004,"Guy3",matches)
endMatch(2005,"Guy9",matches) endMatchWithPin(2005,"Guy9",matches)
endMatch(3004,"Guy7",matches) endMatchWithPin(3004,"Guy7",matches)
endMatchWithQuickestPin(3005,"Guy3",matches) endMatchWithQuickestPin(3005,"Guy3",matches)
end end