aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Genord II <david@collectiveidea.com>2016-02-16 11:40:26 -0500
committerDavid Genord II <david@collectiveidea.com>2016-02-16 11:42:04 -0500
commit72eee06b8861d1e091e03772b0a52051453165bb (patch)
treed4bcf3257b986bcb2850fbb4c7083d13bec58880
parentb0b61b62f9c27eff5b9e0797a0de0d35d64d1620 (diff)
downloadrails-72eee06b8861d1e091e03772b0a52051453165bb.tar.gz
rails-72eee06b8861d1e091e03772b0a52051453165bb.tar.bz2
rails-72eee06b8861d1e091e03772b0a52051453165bb.zip
Test parent local_stored_attributes isn't modified
Saw the `merge!` and had to prove to myself that the parent model's local_stored_attributes was not being changed when stored_attributes is called on a child model. Proved to be working as expected but this test is probably still useful to keep around.
-rw-r--r--activerecord/test/cases/store_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/cases/store_test.rb b/activerecord/test/cases/store_test.rb
index ab63f5825c..bce86875e1 100644
--- a/activerecord/test/cases/store_test.rb
+++ b/activerecord/test/cases/store_test.rb
@@ -177,6 +177,7 @@ class StoreTest < ActiveRecord::TestCase
assert_equal [:color], first_model.stored_attributes[:data]
assert_equal [:color, :width, :height], second_model.stored_attributes[:data]
assert_equal [:color, :area, :volume], third_model.stored_attributes[:data]
+ assert_equal [:color], first_model.stored_attributes[:data]
end
test "YAML coder initializes the store when a Nil value is given" do