Skip to content

Commit

Permalink
not sure what happened, but typhoeus supports head requests now
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Sep 28, 2010
1 parent f888606 commit a290789
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions test/adapters/live_test.rb
Expand Up @@ -74,22 +74,19 @@ class LiveTest < Faraday::TestCase
end
end

# http://github.com/pauldix/typhoeus/issues#issue/7
if ENV['FORCE'] || adapter != Faraday::Adapter::Typhoeus
define_method "test_#{adapter}_HEAD_send_url_encoded_params" do
resp = create_connection(adapter).head do |req|
req.url 'hello', 'name' => 'zack'
end
assert_equal 'text/html', resp.headers['content-type']
define_method "test_#{adapter}_HEAD_send_url_encoded_params" do
resp = create_connection(adapter).head do |req|
req.url 'hello', 'name' => 'zack'
end
assert_equal 'text/html', resp.headers['content-type']
end

define_method "test_#{adapter}_HEAD_retrieves_no_response_body" do
assert_equal '', create_connection(adapter).head('hello_world').body.to_s
end
define_method "test_#{adapter}_HEAD_retrieves_no_response_body" do
assert_equal '', create_connection(adapter).head('hello_world').body.to_s
end

define_method "test_#{adapter}_HEAD_retrieves_the_response_headers" do
assert_equal 'text/html', create_connection(adapter).head('hello_world').headers['content-type']
end
define_method "test_#{adapter}_HEAD_retrieves_the_response_headers" do
assert_equal 'text/html', create_connection(adapter).head('hello_world').headers['content-type']
end

define_method "test_#{adapter}_DELETE_retrieves_the_response_headers" do
Expand Down

0 comments on commit a290789

Please sign in to comment.