Skip to content

Commit

Permalink
more Mojo::URL tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 25, 2012
1 parent 7761eaa commit 58d9d71
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions t/mojo/url.t
Expand Up @@ -642,10 +642,12 @@ is "$url", 'http://mojolicio.us/100%25_fun', 'right format';
$url = Mojo::URL->new;
$url->path->charset(undef);
$url->query->charset(undef);
$url->parse('http://foo.bar/%E4/?%E5=%E4');
is $url->scheme, 'http', 'right scheme';
is $url->host, 'foo.bar', 'right host';
is $url->path, '/%E4/', 'right path';
$url->parse('HTTP://FOO.BAR/%E4/?%E5=%E4');
is $url->scheme, 'HTTP', 'right scheme';
is $url->protocol, 'http', 'right protocol';
is $url->host, 'FOO.BAR', 'right host';
is $url->ihost, 'foo.bar', 'right internationalized host';
is $url->path, '/%E4/', 'right path';
is $url->path->parts->[0], "\xe4", 'right part';
is $url->path->parts->[1], undef, 'no part';
ok $url->path->leading_slash, 'has leading slash';
Expand Down

0 comments on commit 58d9d71

Please sign in to comment.