Not sure that this is doing the right thing. It's not transmitting data as JSON, but as form-encoded POST with a param which contains serialized JSON.

http://stackoverflow.com/questions/2103977/how-to-send-raw-post-data-in-a-rails-functional-test