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

Test case for https://github.com/rails/rails/commit/d35f0033c7dec2b8d8b52058fb8db495d49596f7