Sha256: 25cb20e1a7a67d6551c6536b2586d323f5654a09ab487c3d37a7be397c0d809d

Contents?: true

Size: 945 Bytes

Versions: 37

Compression:

Stored size: 945 Bytes

Contents

with_rackup('basic.ru') do
  Shindo.tests('Excon basics') do
    basic_tests
  end
end

with_rackup('basic_auth.ru') do
  Shindo.tests('Excon basics (Basic Auth Pass)') do
    basic_tests('http://test_user:test_password@127.0.0.1:9292')
  end

  Shindo.tests('Excon basics (Basic Auth Fail)') do
    cases = [
      ['correct user, no password', 'http://test_user@127.0.0.1:9292'],
      ['correct user, wrong password', 'http://test_user:fake_password@127.0.0.1:9292'],
      ['wrong user, correct password', 'http://fake_user:test_password@127.0.0.1:9292'],
    ]
    cases.each do |desc,url|
      connection = Excon.new(url)
      response = connection.request(:method => :get, :path => '/content-length/100')

      tests("response.status for #{desc}").returns(401) do
        response.status
      end

    end
  end
end

with_rackup('ssl.ru') do
  Shindo.tests('Excon basics (ssl)') do
    basic_tests('https://127.0.0.1:9443')
  end
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
excon-0.18.5 tests/basic_tests.rb
excon-0.18.4 tests/basic_tests.rb
excon-0.18.3 tests/basic_tests.rb
excon-0.18.2 tests/basic_tests.rb
excon-0.18.1 tests/basic_tests.rb
excon-0.18.0 tests/basic_tests.rb
excon-0.17.0 tests/basic_tests.rb
excon-0.16.10 tests/basic_tests.rb
excon-0.16.9 tests/basic_tests.rb
excon-0.16.8 tests/basic_tests.rb
excon-0.16.7 tests/basic_tests.rb
excon-0.16.5 tests/basic_tests.rb
excon-0.16.4 tests/basic_tests.rb
excon-0.16.3 tests/basic_tests.rb
excon-0.16.2 tests/basic_tests.rb
excon-0.16.1 tests/basic_tests.rb
excon-0.16.0 tests/basic_tests.rb
excon-0.15.5 tests/basic_tests.rb
excon-0.15.4 tests/basic_tests.rb
excon-0.15.3 tests/basic_tests.rb