File: ssl_spec.rb

package info (click to toggle)
ruby-em-http-request 1.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 632 kB
  • ctags: 244
  • sloc: ruby: 3,653; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'helper'

requires_connection do

  describe EventMachine::HttpRequest do

    it "should initiate SSL/TLS on HTTPS connections" do
      EventMachine.run {
        http = EventMachine::HttpRequest.new('https://mail.google.com:443/mail/').get

        http.errback { failed(http) }
        http.callback {
          http.response_header.status.should == 302
          EventMachine.stop
        }
      }
    end
  end

end