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

Tested serialization in poolbracket integration test

This commit is contained in:
2015-03-27 13:07:32 +00:00
parent f166da9a2f
commit 86faf8b2a4

View File

@@ -3,6 +3,7 @@ require 'test_helper'
class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
def setup
@tournament = Tournament.find(1)
@tournament.upcomingMatches
@genMatchups = @tournament.generateMatchups
end
@@ -49,4 +50,13 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
@twentysix_matches = @genMatchups.select{|m| m.weight_max == 132}
assert_equal 32, @twentysix_matches.length
end
test "tests serialization for matchups" do
@tournament_saved = Tournament.find(1)
@genMatchup = @genMatchups.select{|m| m.boutNumber == 4000}.first
@matchup = @tournament_saved.upcomingMatches.select{|m| m.boutNumber == 4000}.first
assert_equal @genMatchup.w1_name, @matchup.w1_name
end
#todo test crazy movements through each bracket?
end