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:
commit
229dd87717
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