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

Add test for deprecation warning for passing an AR object to find.

This commit is contained in:
Lauro Caetano 2014-03-13 16:10:04 -03:00
parent f8fb1fa67a
commit a9023eccd6

View file

@ -33,6 +33,12 @@ class FinderTest < ActiveRecord::TestCase
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