aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2017-01-03 19:22:52 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-01-03 19:22:52 -0500
commit0df8649f58f27b2b2044651516e935cd10a163f3 (patch)
tree8781403b43cf3ebecf635e56f5eb4ed5ec595b1f /activerecord/test
parente229580b4b1d4001b5a9450e0a50e0c33a779fe1 (diff)
downloadrails-0df8649f58f27b2b2044651516e935cd10a163f3.tar.gz
rails-0df8649f58f27b2b2044651516e935cd10a163f3.tar.bz2
rails-0df8649f58f27b2b2044651516e935cd10a163f3.zip
Remove deprecation of using ActiveRecord::Base instance in .update
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/relations_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 9519fec0c4..3b34caef8e 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -1617,9 +1617,9 @@ class RelationTest < ActiveRecord::TestCase
assert_equal "David", topic2.reload.author_name
end
- def test_update_on_relation_passing_active_record_object_is_deprecated
+ def test_update_on_relation_passing_active_record_object_is_not_permited
topic = Topic.create!(title: "Foo", author_name: nil)
- assert_deprecated(/update/) do
+ assert_raises(ArgumentError) do
Topic.where(id: topic.id).update(topic, title: "Bar")
end
end