Add test case for joined pluck

https://github.com/rails/rails/commit/39542fba54328ca048fb75a5d5b37f8e1d4c1f37#commitcomment-8938379