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

Loser name generation was not saving. Fixed that and added a test.

This commit is contained in:
2015-05-28 12:24:46 +00:00
parent c69a33fbae
commit d065e31818
2 changed files with 15 additions and 1 deletions

View File

@@ -131,5 +131,13 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
end
end
test "test loser name for 16 man bracket 3/4th place match" do
@matches = @tournament.matches.where(weight_id: 5)
@semi_bouts = @matches.where(bracket_position: 'Semis')
@third_fourth_match = @matches.where(bracket_position: '3/4').first
assert_equal "Loser of #{@semi_bouts.first.bout_number}", @third_fourth_match.loser1_name
end
#todo test crazy movements through each bracket?
end