mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-27 08:56:37 +00:00
Tested serialization in poolbracket integration test
This commit is contained in:
@@ -3,6 +3,7 @@ require 'test_helper'
|
|||||||
class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
|
class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
|
||||||
def setup
|
def setup
|
||||||
@tournament = Tournament.find(1)
|
@tournament = Tournament.find(1)
|
||||||
|
@tournament.upcomingMatches
|
||||||
@genMatchups = @tournament.generateMatchups
|
@genMatchups = @tournament.generateMatchups
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -49,4 +50,13 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
|
|||||||
@twentysix_matches = @genMatchups.select{|m| m.weight_max == 132}
|
@twentysix_matches = @genMatchups.select{|m| m.weight_max == 132}
|
||||||
assert_equal 32, @twentysix_matches.length
|
assert_equal 32, @twentysix_matches.length
|
||||||
end
|
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
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user