diff options
author | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-21 19:04:39 +0200 |
---|---|---|
committer | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-21 19:04:39 +0200 |
commit | aad429a46e3017fa7ca73f58428693e821be42b6 (patch) | |
tree | f749e0cdeab20c7f4be37ff49e064705f17cdfa5 /activerecord/test/cases/dirty_test.rb | |
parent | cf6840773b4f5046151f4d28c286069aabaafa10 (diff) | |
parent | 8622787f8748434b4ceb2b925a35b17a38e1f2d6 (diff) | |
download | rails-aad429a46e3017fa7ca73f58428693e821be42b6.tar.gz rails-aad429a46e3017fa7ca73f58428693e821be42b6.tar.bz2 rails-aad429a46e3017fa7ca73f58428693e821be42b6.zip |
Merge branch 'master' into i18n
Diffstat (limited to 'activerecord/test/cases/dirty_test.rb')
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index e5e022050d..feb47a15a8 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -191,6 +191,18 @@ class DirtyTest < ActiveRecord::TestCase assert !pirate.changed? end + def test_save_should_store_serialized_attributes_even_with_partial_updates + with_partial_updates(Topic) do + topic = Topic.create!(:content => {:a => "a"}) + topic.content[:b] = "b" + #assert topic.changed? # Known bug, will fail + topic.save! + assert_equal "b", topic.content[:b] + topic.reload + assert_equal "b", topic.content[:b] + end + end + private def with_partial_updates(klass, on = true) old = klass.partial_updates? |