Skip to content

Instantly share code, notes, and snippets.

@trevorturk
Forked from technoweenie/gist:428825
Created June 7, 2010 18:42
Show Gist options
  • Save trevorturk/429005 to your computer and use it in GitHub Desktop.
Save trevorturk/429005 to your computer and use it in GitHub Desktop.
require 'test_helper'
class UsersTest < ActionController::IntegrationTest
setup do
reset!
@conn = Faraday::Connection.new do |b|
b.adapter :action_dispatch, @integration_session
b.response :rails_json
end
end
test "the truth" do
resp = @conn.get '/users.json'
user = resp.body[0]
assert_equal 1, resp.body.size
assert_equal "[email protected]", user['email']
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment