How can I assert my Ajax request and test the JSON output from Ruby on Rails functional tests?
Actually, you can use implicitly the JSON module:
assert_equal assigns(:user).to_json, @response.body