File: httpclient_test.rb

package info (click to toggle)
ruby-faraday 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 508 kB
  • ctags: 836
  • sloc: ruby: 4,882; sh: 138; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 550 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require File.expand_path('../integration', __FILE__)

module Adapters
  class HttpclientTest < Faraday::TestCase

    def adapter() :httpclient end

    Integration.apply(self, :NonParallel) do
      def setup
        require 'httpclient' unless defined?(HTTPClient)
        HTTPClient::NO_PROXY_HOSTS.delete('localhost')
      end

      def test_binds_local_socket
        host = '1.2.3.4'
        conn = create_connection :request => { :bind => { :host => host } }
        assert_equal host, conn.options[:bind][:host]
      end
    end
  end
end