Testing rest api request and response in Rails