Skip to content

Commit

Permalink
integration test for FollowRedirects
Browse files Browse the repository at this point in the history
initial simple test for the purpose of discussing how we might
want to go about writing integration tests
  • Loading branch information
jjb committed Oct 6, 2014
1 parent 7731b7a commit 3794369
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/integration/follow_redirects_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require "rspec"
require "faraday"
require "faraday_middleware"

describe FaradayMiddleware::FollowRedirects do
it "redirects" do
connection = Faraday.new do |conn|
conn.use FaradayMiddleware::FollowRedirects
conn.adapter Faraday.default_adapter
end

response = connection.get "http://facebook.com"
expect(response.env.url.to_s).to eq("https://www.facebook.com/")
end
end

0 comments on commit 3794369

Please sign in to comment.