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:
parent
f8fb1fa67a
commit
a9023eccd6
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue