Skip to content

Commit

Permalink
a few more router tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 7, 2013
1 parent 9c6510e commit d666635
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -2,6 +2,7 @@
3.75 2013-01-08
- Added to_route method to Mojo::Path.
- Improved router performance slightly.
- Improved tests.

3.74 2013-01-07
- Improved documentation.
Expand Down
7 changes: 7 additions & 0 deletions t/mojolicious/routes.t
Expand Up @@ -484,6 +484,13 @@ is $m->stack->[0]{action}, 'card', 'right value';
is $m->stack->[0]{wildcard}, 'http://www.google.com', 'right value';
is $m->path_for, '/wildcards/1/http://www.google.com', 'right path';
is @{$m->stack}, 1, 'right number of elements';
$m = Mojolicious::Routes::Match->new(GET => '/wildcards/1/%foo%bar%');
$m->match($r, $c);
is $m->stack->[0]{controller}, 'wild', 'right value';
is $m->stack->[0]{action}, 'card', 'right value';
is $m->stack->[0]{wildcard}, '%foo%bar%', 'right value';
is $m->path_for, '/wildcards/1/%foo%bar%', 'right path';
is @{$m->stack}, 1, 'right number of elements';

# Format
$m = Mojolicious::Routes::Match->new(GET => '/format');
Expand Down

0 comments on commit d666635

Please sign in to comment.