diff options
author | Matthew Draper <matthew@trebex.net> | 2014-06-14 04:46:05 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2014-06-14 04:46:05 +0930 |
commit | 584498a61f56211871698a1db67dd9626c3cadfe (patch) | |
tree | 13c328f1feefddcc4a2932b740af1e9c28485f6f /activerecord/test | |
parent | e61e1b30a5751e1e216b18edfb49661b511d7ce2 (diff) | |
parent | 6ea1481d6991aa6eb67b9fb135b778908922d675 (diff) | |
download | rails-584498a61f56211871698a1db67dd9626c3cadfe.tar.gz rails-584498a61f56211871698a1db67dd9626c3cadfe.tar.bz2 rails-584498a61f56211871698a1db67dd9626c3cadfe.zip |
Merge pull request #15689 from sgrif/sg-attribute-methods
Ensure we always define attribute methods
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/serialization_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/serialization_test.rb b/activerecord/test/cases/serialization_test.rb index 7dd1f10ce9..3f52e80e11 100644 --- a/activerecord/test/cases/serialization_test.rb +++ b/activerecord/test/cases/serialization_test.rb @@ -69,6 +69,14 @@ class SerializationTest < ActiveRecord::TestCase ActiveRecord::Base.include_root_in_json = original_root_in_json end + def test_read_attribute_for_serialization_with_format_without_method_missing + klazz = Class.new(ActiveRecord::Base) + klazz.table_name = 'books' + + book = klazz.new + assert_nil book.read_attribute_for_serialization(:format) + end + def test_read_attribute_for_serialization_with_format_after_init klazz = Class.new(ActiveRecord::Base) klazz.table_name = 'books' |