Skip to content

Commit

Permalink
test the host_port method too
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 23, 2017
1 parent a48d0e6 commit db337ec
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions t/mojo/url.t
Expand Up @@ -320,11 +320,12 @@ is "$url", 'wss://[::1]:3000/', 'right format';

# Escaped host
$url = Mojo::URL->new('http+unix://%2FUsers%2Fsri%2Ftest.sock/index.html');
ok $url->is_abs, 'is absolute';
is $url->scheme, 'http+unix', 'right scheme';
is $url->host, '/Users/sri/test.sock', 'right host';
is $url->port, undef, 'no port';
is $url->path, '/index.html', 'right path';
ok $url->is_abs, 'is absolute';
is $url->scheme, 'http+unix', 'right scheme';
is $url->host, '/Users/sri/test.sock', 'right host';
is $url->port, undef, 'no port';
is $url->host_port, '/Users/sri/test.sock', 'right host and port';
is $url->path, '/index.html', 'right path';
is "$url", 'http+unix://%2FUsers%2Fsri%2Ftest.sock/index.html', 'right format';

# IDNA
Expand Down

0 comments on commit db337ec

Please sign in to comment.