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

Adding a test case for this commit https://github.com/rails/rails/commit/d92ae6ccca3bcfd73546d612efaea011270bd270