mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Added quick create high school girls weight classes
This commit is contained in:
@@ -11,4 +11,20 @@ class TournamentTest < ActiveSupport::TestCase
|
||||
assert_not tourney.valid?
|
||||
assert_equal [:date, :name, :tournament_type, :address, :director, :director_email], tourney.errors.attribute_names
|
||||
end
|
||||
|
||||
test "Tournament create_pre_defined_weights High School Boys Weights" do
|
||||
tournament = Tournament.find(1)
|
||||
tournament.create_pre_defined_weights(Weight::HS_WEIGHT_CLASSES.split(","))
|
||||
Weight::HS_WEIGHT_CLASSES.split(",").each do |weight|
|
||||
assert tournament.weights.select{|w| w.max == weight.to_i}.count == 1
|
||||
end
|
||||
end
|
||||
|
||||
test "Tournament create_pre_defined_weights High School Girls Weights" do
|
||||
tournament = Tournament.find(1)
|
||||
tournament.create_pre_defined_weights(Weight::HS_GIRLS_WEIGHT_CLASSES.split(","))
|
||||
Weight::HS_GIRLS_WEIGHT_CLASSES.split(",").each do |weight|
|
||||
assert tournament.weights.select{|w| w.max == weight.to_i}.count == 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user