1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

Add test for deprecation warning for passing an AR object to `find`.
This commit is contained in:
Godfrey Chan 2014-03-13 12:13:14 -07:00
commit 229dd87717

View file

@ -33,6 +33,12 @@ class FinderTest < ActiveRecord::TestCase
assert_equal(topics(:first).title, Topic.find(1).title) assert_equal(topics(:first).title, Topic.find(1).title)
end end
def test_find_passing_active_record_object_is_deprecated
assert_deprecated do
Topic.find(Topic.last)
end
end
def test_symbols_table_ref def test_symbols_table_ref
Post.first # warm up Post.first # warm up
x = Symbol.all_symbols.count x = Symbol.all_symbols.count