Updated #14544 to work with `activerecord-deprecated_finders`

Simply used older style of lambda definitions within a test.
See #14544 for complete description.