Move record test outside of let