Skip to content
Browse files

Merge pull request #14376 from laurocaetano/test-deprecation-warning-…

…for-find

Add test for deprecation warning for passing an AR object to `find`.
  • Loading branch information...
2 parents f8fb1fa + a9023ec commit 229dd87717d3e0d8a1d32a8acf32a3d90217782f @chancancode chancancode committed Mar 13, 2014
Showing with 6 additions and 0 deletions.
  1. +6 −0 activerecord/test/cases/finder_test.rb
View
6 activerecord/test/cases/finder_test.rb
@@ -33,6 +33,12 @@ def test_find
assert_equal(topics(:first).title, Topic.find(1).title)
end
+ def test_find_passing_active_record_object_is_deprecated
+ assert_deprecated do
+ Topic.find(Topic.last)
+ end
+ end
+
def test_symbols_table_ref
Post.first # warm up
x = Symbol.all_symbols.count

0 comments on commit 229dd87

Please sign in to comment.
Something went wrong with that request. Please try again.