Fixed test breakages, due to Rails upgrade, which didn't cause tests to fail but resulted in loss of coverage