1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-02 21:24:25 +00:00

Added tests for modified double elimination, added a 1-8 place modified double elimination, and renamed regular double elimination

This commit is contained in:
2021-02-20 01:33:31 +00:00
parent 89a695388a
commit 537eccf04d
17 changed files with 591 additions and 146 deletions

View File

@@ -41,7 +41,29 @@ class ActiveSupport::TestCase
@tournament.address = "some place"
@tournament.director = "some guy"
@tournament.director_email= "test@test.com"
@tournament.tournament_type = "Double Elimination 1-6"
@tournament.tournament_type = "Regular Double Elimination 1-6"
@tournament.date = "2015-12-30"
@tournament.save
@school = School.new
@school.name = "Test"
@school.tournament_id = @tournament.id
@school.save
@weight = Weight.new
@weight.max = 106
@weight.tournament_id = @tournament.id
@weight.save
create_wrestlers_for_weight_for_double_elim(@weight, @school, number_of_wrestlers, 1)
GenerateTournamentMatches.new(@tournament).generate
return @tournament
end
def create_double_elim_tournament_single_weight(number_of_wrestlers, tournament_type)
@tournament = Tournament.new
@tournament.name = "Test Tournament"
@tournament.address = "some place"
@tournament.director = "some guy"
@tournament.director_email= "test@test.com"
@tournament.tournament_type = tournament_type
@tournament.date = "2015-12-30"
@tournament.save
@school = School.new