aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/serialized_attribute_test.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/activerecord/test/cases/serialized_attribute_test.rb b/activerecord/test/cases/serialized_attribute_test.rb
index a8f667c732..186a1a2ade 100644
--- a/activerecord/test/cases/serialized_attribute_test.rb
+++ b/activerecord/test/cases/serialized_attribute_test.rb
@@ -3,11 +3,10 @@ require 'models/topic'
require 'models/reply'
require 'models/person'
require 'models/traffic_light'
-require 'models/post'
require 'bcrypt'
class SerializedAttributeTest < ActiveRecord::TestCase
- fixtures :topics, :posts
+ fixtures :topics
MyObject = Struct.new :attribute1, :attribute2
@@ -68,19 +67,6 @@ class SerializedAttributeTest < ActiveRecord::TestCase
assert_equal(orig.content, clone.content)
end
- def test_serialized_json_attribute_returns_unserialized_value
- Topic.serialize :content, JSON
- my_post = posts(:welcome)
-
- t = Topic.new(content: my_post)
- t.save!
- t.reload
-
- assert_instance_of(Hash, t.content)
- assert_equal(my_post.id, t.content["id"])
- assert_equal(my_post.title, t.content["title"])
- end
-
def test_serialized_attribute_declared_in_subclass
hash = { 'important1' => 'value1', 'important2' => 'value2' }
important_topic = ImportantTopic.create("important" => hash)