Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user = JSON.parse(@response.body)
- assert_equal "Mike", user['name']
- def json_response
- ActiveSupport::JSON.decode @response.body
- end
- assert_equal "Mike", json_response['name']
- assert_equal '{"total_votes":1}', @response.body
Add Comment
Please, Sign In to add comment