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:
@@ -17,6 +17,7 @@ class Match < ActiveRecord::Base
|
||||
@w2 = Wrestler.find(self.w2)
|
||||
@w1.advanceInBracket
|
||||
@w2.advanceInBracket
|
||||
self.mat.assignNextMatch
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user