aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-04-25 23:58:23 -0700
committerJosé Valim <jose.valim@gmail.com>2011-04-25 23:58:23 -0700
commitb73c84eaa76da4386dc4b78cdfc75baf0a08f6f2 (patch)
treeb5166a57393b723bf38377f4623fcee23987b1b4 /activerecord/test
parent3a109f78cd403e9257a5765b56ee9363deed0aa4 (diff)
parentf9d5a7bb8c5d224f689dafb4ff641e2ced244f03 (diff)
downloadrails-b73c84eaa76da4386dc4b78cdfc75baf0a08f6f2.tar.gz
rails-b73c84eaa76da4386dc4b78cdfc75baf0a08f6f2.tar.bz2
rails-b73c84eaa76da4386dc4b78cdfc75baf0a08f6f2.zip
Merged pull request #308 from joshk/assign_attributes.
deprecated the use of guard_protected_attributes with attributes= in AR
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/base_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index ef833857ce..5ee3b2d776 100644
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -489,6 +489,12 @@ class BasicsTest < ActiveRecord::TestCase
assert_equal 'value2', weird.send('a$b')
end
+ def test_attributes_guard_protected_attributes_is_deprecated
+ attributes = { "title" => "An amazing title" }
+ topic = Topic.new
+ assert_deprecated { topic.send(:attributes=, attributes, false) }
+ end
+
def test_multiparameter_attributes_on_date
attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "6", "last_read(3i)" => "24" }
topic = Topic.find(1)