added more test cases for rails/rails#10865