Test deprecation warning for passing an ActiveRecord object to
`exists?`
Merge pull request #14375 from laurocaetano/test-deprecation-warning-for-exists

Add test for deprecation warning for passing an AR object to `exists?`.