diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/validations_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb index 27a42bcd03..69691aad02 100644 --- a/activerecord/test/cases/validations_test.rb +++ b/activerecord/test/cases/validations_test.rb @@ -141,4 +141,13 @@ class ValidationsTest < ActiveRecord::TestCase assert_equal ['tu est trops petit hombre 10'], t.errors[:title] end + + def test_validates_acceptance_of_as_database_column + repair_validations(Reply) do + Reply.validates_acceptance_of(:author_name) + + reply = Reply.create("author_name" => "Dan Brown") + assert_equal "Dan Brown", reply["author_name"] + end + end end |