Skip to content

Commit

Permalink
added HTTPS online test
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 18, 2012
1 parent bf39a3a commit 0f2cd79
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion t/mojo/user_agent_online.t
Expand Up @@ -12,7 +12,7 @@ plan skip_all => 'set TEST_ONLINE to enable this test (developer only!)'
unless $ENV{TEST_ONLINE};
plan skip_all => 'IO::Socket::SSL 1.37 required for this test!'
unless Mojo::IOLoop::Server::TLS;
plan tests => 106;
plan tests => 109;

# "So then I said to the cop, "No, you're driving under the influence...
# of being a jerk"."
Expand Down Expand Up @@ -159,6 +159,12 @@ is $tx->req->method, 'GET', 'right method';
is $tx->req->url, 'http://metacpan.org', 'right url';
is $tx->res->code, 301, 'right status';

# Simple HTTPS request
$tx = $ua->get('https://www.metacpan.org');
is $tx->req->method, 'GET', 'right method';
is $tx->req->url, 'https://www.metacpan.org', 'right url';
is $tx->res->code, 200, 'right status';

# HTTPS request that requires SNI
$tx = $ua->get('https://google.de');
like $ua->ioloop->stream($tx->connection)
Expand Down

0 comments on commit 0f2cd79

Please sign in to comment.