1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-24 17:04:43 +00:00

Added a tournament error if more than 1 person in a weight has the same seed.

This commit is contained in:
2025-01-07 16:00:17 -05:00
parent b5150a3a37
commit 275847befe
2 changed files with 27 additions and 0 deletions

View File

@@ -747,4 +747,17 @@ class TournamentsControllerTest < ActionController::TestCase
get :generate_matches, params: { id: @tournament.id }
redirect_tournament_error
end
test "tournament generation error when two wrestlers in a weight class have the same original_seed" do
sign_in_owner
create_pool_tournament_single_weight(5)
@tournament.destroy_all_matches
@tournament.user_id = 1
@tournament.save
wrestler = @tournament.weights.first.wrestlers.second
wrestler.original_seed = 1
wrestler.save
get :generate_matches, params: { id: @tournament.id }
redirect_tournament_error
end
end