Sha256: 27d5efa06b913710b4c4a03be90ef6239d923da1d470b59cbd902143cb4eea6d

Contents?: true

Size: 791 Bytes

Versions: 17

Compression:

Stored size: 791 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), "..", "lib")

require 'test/unit'
require 'rubygems'
require 'mechanize'
require 'test_includes'

class SSLServerTest < Test::Unit::TestCase
  include TestMethods

  def setup
    @agent = WWW::Mechanize.new
  end

  def test_ssl_request
    non_ssl_page = @agent.get("http://localhost:#{PORT}/form_test.html")
    ssl_page = @agent.get("https://localhost:#{SSLPORT}/form_test.html")
    assert_equal(non_ssl_page.body.length, ssl_page.body.length)
  end

  def test_ssl_request_verify
    non_ssl_page = @agent.get("http://localhost:#{PORT}/form_test.html")
    @agent.ca_file = 'data/server.crt'
    ssl_page = @agent.get("https://localhost:#{SSLPORT}/form_test.html")
    assert_equal(non_ssl_page.body.length, ssl_page.body.length)
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mechanize-0.5.4 test/tc_ssl_server.rb
mechanize-0.5.2 test/tc_ssl_server.rb
mechanize-0.5.0 test/tc_ssl_server.rb
mechanize-0.5.1 test/tc_ssl_server.rb
mechanize-0.5.3 test/tc_ssl_server.rb
mechanize-0.6.0 test/tc_ssl_server.rb
mechanize-0.6.1 test/tc_ssl_server.rb
mechanize-0.6.10 test/tc_ssl_server.rb
mechanize-0.6.7 test/tc_ssl_server.rb
mechanize-0.6.8 test/tc_ssl_server.rb
mechanize-0.6.4 test/tc_ssl_server.rb
mechanize-0.6.9 test/tc_ssl_server.rb
mechanize-0.6.11 test/tc_ssl_server.rb
mechanize-0.6.2 test/tc_ssl_server.rb
mechanize-0.6.3 test/tc_ssl_server.rb
mechanize-0.6.5 test/tc_ssl_server.rb
mechanize-0.6.6 test/tc_ssl_server.rb