record your rails requests and use them in your javascript tests