diff options
Diffstat (limited to 'activerecord/test/validations_test.rb')
-rwxr-xr-x | activerecord/test/validations_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/validations_test.rb b/activerecord/test/validations_test.rb index a694cbfe72..82b321a8c2 100755 --- a/activerecord/test/validations_test.rb +++ b/activerecord/test/validations_test.rb @@ -301,6 +301,14 @@ class ValidationsTest < Test::Unit::TestCase assert_equal "Dan Brown", reply["author_name"] end + def test_validates_acceptance_of_with_non_existant_table + Object.const_set :IncorporealModel, Class.new(ActiveRecord::Base) + + assert_nothing_raised ActiveRecord::StatementInvalid do + IncorporealModel.validates_acceptance_of(:incorporeal_column) + end + end + def test_validate_presences Topic.validates_presence_of(:title, :content) |