aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rwxr-xr-xactiverecord/test/attribute_methods_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/attribute_methods_test.rb b/activerecord/test/attribute_methods_test.rb
index 0fa13c65ca..c031d78357 100755
--- a/activerecord/test/attribute_methods_test.rb
+++ b/activerecord/test/attribute_methods_test.rb
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'fixtures/topic'
class AttributeMethodsTest < Test::Unit::TestCase
def setup
@@ -46,4 +47,12 @@ class AttributeMethodsTest < Test::Unit::TestCase
assert_equal ['title', 1, 2, 3], topic.send(meth, 1, 2, 3)
end
end
+
+ def test_should_unserialize_attributes_for_frozen_records
+ myobj = {:value1 => :value2}
+ topic = Topic.create("content" => myobj)
+ topic.freeze
+ assert_equal myobj, topic.content
+
+ end
end