Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added HTTPS online test

  • Loading branch information...
commit 0f2cd791210079d2435144bf7ced333c279d203d 1 parent bf39a3a
@kraih authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 t/mojo/user_agent_online.t
View
8 t/mojo/user_agent_online.t
@@ -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"."
@@ -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)

0 comments on commit 0f2cd79

Please sign in to comment.
Something went wrong with that request. Please try again.