mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-10 07:48:29 +00:00
Model validations
This commit is contained in:
@@ -4,4 +4,10 @@ class WrestlerTest < ActiveSupport::TestCase
|
||||
test "the truth" do
|
||||
assert true
|
||||
end
|
||||
|
||||
test "Wrestler validations" do
|
||||
wrestler = Wrestler.new
|
||||
assert_not wrestler.valid?
|
||||
assert_equal [:name, :weight_id, :school_id], wrestler.errors.keys
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user