diff options
Diffstat (limited to 'activerecord/test/cases/serialization_test.rb')
-rw-r--r-- | activerecord/test/cases/serialization_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/cases/serialization_test.rb b/activerecord/test/cases/serialization_test.rb index dab81530af..677d659f39 100644 --- a/activerecord/test/cases/serialization_test.rb +++ b/activerecord/test/cases/serialization_test.rb @@ -5,7 +5,7 @@ require 'models/reply' require 'models/company' class SerializationTest < ActiveRecord::TestCase - + fixtures :topics, :companies, :accounts FORMATS = [ :xml, :json ] @@ -23,6 +23,12 @@ class SerializationTest < ActiveRecord::TestCase @contact = Contact.new(@contact_attributes) end + def test_serialized_init_with + topic = Topic.allocate + topic.init_with('attributes' => { 'content' => '--- foo' }) + assert_equal 'foo', topic.content + end + def test_to_xml xml = REXML::Document.new(topics(:first).to_xml(:indent => 0)) bonus_time_in_current_timezone = topics(:first).bonus_time.xmlschema |