mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-08 15:29:20 +00:00
Pool order tests are not asserting properly and once fixed some were failing. All tests fixed and passing now.
This commit is contained in:
@@ -172,7 +172,7 @@ class ActiveSupport::TestCase
|
||||
def team_point_adjusts_for_wrestler(wrestler_name,points)
|
||||
adjust = Teampointadjust.new
|
||||
adjust.points = points
|
||||
adjust.wrestler_id = get_wrestler_by_name(wrestler_name)
|
||||
adjust.wrestler_id = get_wrestler_by_name(wrestler_name).id
|
||||
adjust.save
|
||||
end
|
||||
|
||||
@@ -201,19 +201,19 @@ class ActiveSupport::TestCase
|
||||
|
||||
def end_match_extra_points(match,winner)
|
||||
match.win_type = "Decision"
|
||||
match.score = 0-2
|
||||
match.score = "0-2"
|
||||
save_match(match,winner)
|
||||
end
|
||||
|
||||
def end_match_with_major(match,winner)
|
||||
match.win_type = "Major"
|
||||
match.score = 8-0
|
||||
match.score = "8-0"
|
||||
save_match(match,winner)
|
||||
end
|
||||
|
||||
def end_match_with_tech(match,winner)
|
||||
match.win_type = "Tech Fall"
|
||||
match.score = 15-0
|
||||
match.score = "15-0"
|
||||
save_match(match,winner)
|
||||
end
|
||||
|
||||
@@ -235,6 +235,12 @@ class ActiveSupport::TestCase
|
||||
save_match(match,winner)
|
||||
end
|
||||
|
||||
def end_match_custom(match,win_type,score,winner)
|
||||
match.win_type = win_type
|
||||
match.score = score
|
||||
save_match(match,winner)
|
||||
end
|
||||
|
||||
def save_match(match,winner)
|
||||
match.finished = 1
|
||||
match.winner_id = translate_name_to_id(winner)
|
||||
|
||||
Reference in New Issue
Block a user