Skip to content

Commit

Permalink
more IPv6 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 28, 2012
1 parent 79db109 commit fcc3f02
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,4 +1,7 @@

2.98 2012-05-29
- Improved tests.

2.97 2012-05-28
- Added workaround to make IO::Socket::SSL work with IO::Socket::IP.
- Removed Bonjour support.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -34,7 +34,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.97';
our $VERSION = '2.98';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down
10 changes: 8 additions & 2 deletions t/mojo/user_agent_online.t
Expand Up @@ -14,7 +14,7 @@ plan skip_all => 'IO::Socket::IP 0.06 required for this test!'
unless Mojo::IOLoop::Server::IPV6;
plan skip_all => 'IO::Socket::SSL 1.37 required for this test!'
unless Mojo::IOLoop::Server::TLS;
plan tests => 84;
plan tests => 86;

# "So then I said to the cop, "No, you're driving under the influence...
# of being a jerk"."
Expand Down Expand Up @@ -77,12 +77,18 @@ $ua->start($tx);
ok !$tx->is_finished, 'transaction is not finished';
ok $tx->error, 'has error';

# Connection refused
# Connection refused (IPv4)
$tx = $ua->build_tx(GET => "http://127.0.0.1:$port");
$ua->start($tx);
ok !$tx->is_finished, 'transaction is not finished';
ok $tx->error, 'has error';

# Connection refused (IPv6)
$tx = $ua->build_tx(GET => "http://[::1]:$port");
$ua->start($tx);
ok !$tx->is_finished, 'transaction is not finished';
ok $tx->error, 'has error';

# Host does not exist
$tx = $ua->build_tx(GET => 'http://cdeabcdeffoobarnonexisting.com');
$ua->start($tx);
Expand Down

0 comments on commit fcc3f02

Please sign in to comment.