How to test Net::HTTP::Post request in ruby and minitest
I'm trying to make sure a callback json object is properly sent by
Net::HTTP::Post, how do I test it in minitest? What I wanted is to compare
the POST body to the JSON object that I want to be sent when I call the
#perform method of a delayed_job class. I also want to make sure a target
URL actually received this POST request.
I looked at fakeweb, but it looks like it doesn't do POST requests. The
closest I could do seems to be http://requestb.in/, but it seems to be a
bit manual.
No comments:
Post a Comment