Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better tests for already prepared IO::Socket::SSL handle
  • Loading branch information
kraih committed May 20, 2012
1 parent 8655c61 commit e229b80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/IOLoop/Client.pm
Expand Up @@ -2,7 +2,7 @@ package Mojo::IOLoop::Client;
use Mojo::Base 'Mojo::EventEmitter';

use IO::Socket::INET;
use Scalar::Util qw/blessed weaken/;
use Scalar::Util 'weaken';
use Socket qw(IPPROTO_TCP SO_ERROR TCP_NODELAY);

# IPv6 support requires IO::Socket::IP
Expand Down
8 changes: 5 additions & 3 deletions t/mojo/user_agent_tls.t
Expand Up @@ -12,7 +12,7 @@ plan skip_all => 'set TEST_TLS to enable this test (developer only!)'
unless $ENV{TEST_TLS};
plan skip_all => 'IO::Socket::SSL 1.37 required for this test!'
unless Mojo::IOLoop::Server::TLS;
plan tests => 22;
plan tests => 24;

# "That does not compute.
# Really?
Expand Down Expand Up @@ -77,8 +77,10 @@ $tx = $ua->build_tx(GET => 'https://lalala/');
$tx->connection($sock);
$ua->start($tx);
ok $tx->success, 'successful';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'right content';
is $tx->req->method, 'GET', 'right method';
is $tx->req->url, 'https://lalala/', 'right url';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works!', 'right content';

# Valid certificates (env)
$ua = Mojo::UserAgent->new(ioloop => $ua->ioloop);
Expand Down

0 comments on commit e229b80

Please sign in to comment.