1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

update bout board when matches end

This commit is contained in:
2015-10-19 19:45:43 -04:00
parent 2df576e93c
commit aec3702835
2 changed files with 4 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ class Match < ActiveRecord::Base
@w2 = Wrestler.find(self.w2)
@w1.advanceInBracket
@w2.advanceInBracket
self.mat.assignNextMatch
end
end

View File

@@ -1,9 +1,6 @@
require 'test_helper'
class PoolAdvancementTest < ActionDispatch::IntegrationTest
test "the truth" do
assert true
end
def setup
@tournament = Tournament.find(1)
@@ -30,6 +27,9 @@ class PoolAdvancementTest < ActionDispatch::IntegrationTest
@match.finished = 1
@match.winner_id = translateNameToId(winner)
@match.win_type = "Decision"
#Need to manually assign mat_id because thise weight class is not currently assigned a mat
@mat = @tournament.mats.first
@match.mat_id = @mat.id
@match.save
end
def translateNameToId(wrestler)