File: test_mech_proxy.rb

package info (click to toggle)
libwww-mechanize-ruby 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 956 kB
  • ctags: 883
  • sloc: ruby: 6,621; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 381 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require "helper"

class TestMechProxy< Test::Unit::TestCase
  def setup
    @agent = Mechanize.new
  end

  def test_set_proxy
    @agent.set_proxy('www.example.com', 9001, 'joe', 'lol')

    assert_equal(@agent.proxy_addr, 'www.example.com')
    assert_equal(@agent.proxy_port, 9001)
    assert_equal(@agent.proxy_user, 'joe')
    assert_equal(@agent.proxy_pass, 'lol')
  end
end