Sha256: 6bec66370f367da8117b04e2d403ceb49b666fb4f3a9636334c3a2bf04b420c8

Contents?: true

Size: 600 Bytes

Versions: 6

Compression:

Stored size: 600 Bytes

Contents

require "helper"

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

  def test_ssl_request
    non_ssl_page = @agent.get("http://localhost/form_test.html")
    ssl_page = @agent.get("https://localhost/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/form_test.html")
    @agent.ca_file = 'data/server.crt'
    ssl_page = @agent.get("https://localhost/form_test.html")
    assert_equal(non_ssl_page.body.length, ssl_page.body.length)
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
domo-0.0.4 vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_ssl_server.rb
mechanize-2.0 test/test_ssl_server.rb
mechanize-2.0.pre.2 test/test_ssl_server.rb
mechanize-2.0.pre.1 test/test_ssl_server.rb
mechanize-1.0.1.beta.20110107104205 test/test_ssl_server.rb
mechanize-1.0.0 test/test_ssl_server.rb