From 4bb81417a9685b47000726423c2b1d81f9960c10 Mon Sep 17 00:00:00 2001 From: jcwimer Date: Thu, 17 Dec 2015 14:48:07 +0000 Subject: [PATCH] Fixed bug in test for quickest pin then fixed bug in quickest pin tie breaker --- app/models/wrestler.rb | 2 +- test/integration/pool_advancement_test.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/wrestler.rb b/app/models/wrestler.rb index 0342ad1..d957a18 100644 --- a/app/models/wrestler.rb +++ b/app/models/wrestler.rb @@ -177,7 +177,7 @@ class Wrestler < ActiveRecord::Base end def fastestPin - pinWins.sort_by{|m| m.pinTime}.reverse.first + pinWins.sort_by{|m| m.pinTime}.first end def seasonWinPercentage diff --git a/test/integration/pool_advancement_test.rb b/test/integration/pool_advancement_test.rb index 63b02af..5d027f5 100644 --- a/test/integration/pool_advancement_test.rb +++ b/test/integration/pool_advancement_test.rb @@ -131,10 +131,10 @@ class PoolAdvancementTest < ActionDispatch::IntegrationTest def nineManBracketPoolTwoGuyThreeQuickestPin matches = @matches.select{|m| m.weight_id == 3 && m.bracket_position == "Pool"} endMatchWithQuickPin(1004,"Guy9",matches) - endMatch(1005,"Guy7",matches) + endMatchWithPin(1005,"Guy7",matches) endMatchWithQuickPin(2004,"Guy3",matches) - endMatch(2005,"Guy9",matches) - endMatch(3004,"Guy7",matches) + endMatchWithPin(2005,"Guy9",matches) + endMatchWithPin(3004,"Guy7",matches) endMatchWithQuickestPin(3005,"Guy3",matches) end