Skip to content

Commit

Permalink
more to_route tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 8, 2013
1 parent 52d43aa commit c1d5d44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Mojo/Path.pm
Expand Up @@ -244,7 +244,7 @@ Turn path into an absolute string.
Turn path into a route.
# "/i/♥/mojolicious"
Mojo::Path->new('/i/%E2%99%A5/mojolicious')->to_route;
Mojo::Path->new('i/%E2%99%A5/mojolicious')->to_route;
=head2 to_string
Expand All @@ -253,8 +253,8 @@ Turn path into a route.
Turn path into a string.
# "/i/%E2%99%A5/mojolicious"
Mojo::Path->new('/i/%E2%99%A5/mojolicious')->to_string;
# "i/%E2%99%A5/mojolicious"
Mojo::Path->new('i/%E2%99%A5/mojolicious')->to_string;
=head1 SEE ALSO
Expand Down
2 changes: 2 additions & 0 deletions t/mojo/path.t
Expand Up @@ -196,11 +196,13 @@ $path->merge('/bar/baz');
is "$path", '/bar/baz', 'right path';
ok $path->leading_slash, 'has leading slash';
ok !$path->trailing_slash, 'no trailing slash';
is $path->to_route, '/bar/baz', 'right route';
$path = Mojo::Path->new('/foo/bar');
$path->merge('/bar/baz/');
is "$path", '/bar/baz/', 'right path';
ok $path->leading_slash, 'has leading slash';
ok $path->trailing_slash, 'has trailing slash';
is $path->to_route, '/bar/baz/', 'right route';
$path = Mojo::Path->new('foo/bar');
$path->merge('baz/yada');
is "$path", 'foo/baz/yada', 'right path';
Expand Down

0 comments on commit c1d5d44

Please sign in to comment.