diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-07-05 15:29:15 -0700 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-07-05 15:29:15 -0700 |
commit | 6f3c64eeb1dc8288dae49f114aaf619adc7dcb7f (patch) | |
tree | 57d11c3bab0f301739c21c7c3cd8c94a266cdc1d /activerecord/test | |
parent | a03097759bd7103bb9db253e7ba095f011453f75 (diff) | |
download | rails-6f3c64eeb1dc8288dae49f114aaf619adc7dcb7f.tar.gz rails-6f3c64eeb1dc8288dae49f114aaf619adc7dcb7f.tar.bz2 rails-6f3c64eeb1dc8288dae49f114aaf619adc7dcb7f.zip |
Revert "Merge pull request #16059 from jenncoop/json-serialized-attr"
This reverts commit a03097759bd7103bb9db253e7ba095f011453f75.
This needs more work before it would work correctly on master.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/serialized_attribute_test.rb | 16 |
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) |