Skip to content

Commit

Permalink
more path generation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 21, 2013
1 parent 1d4a435 commit df80703
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

3.86 2013-02-21
3.86 2013-02-22
- Improved portability of Mojo::Asset::File tests.
- Improved documentation.
- Improved tests. (jberger, sri)
Expand Down
4 changes: 4 additions & 0 deletions t/mojolicious/routes.t
Expand Up @@ -249,6 +249,8 @@ is $m->stack->[0]{foo}, 11, 'right value';
is @{$m->stack}, 1, 'right number of elements';
is $m->path_for, '/alternatives', 'right path';
is $m->path_for(format => 'txt'), '/alternatives/11.txt', 'right path';
is $m->path_for(foo => 12, format => 'txt'), '/alternatives/12.txt',
'right path';
$m = Mojolicious::Routes::Match->new(GET => '/alternatives/0');
$m->match($r, $c);
is $m->stack->[0]{foo}, 0, 'right value';
Expand Down Expand Up @@ -276,6 +278,8 @@ is @{$m->stack}, 0, 'right number of elements';
is $m->path_for('alternativesfoo'), '/alternatives', 'right path';
is $m->path_for('alternativesfoo', format => 'txt'), '/alternatives/11.txt',
'right path';
is $m->path_for('alternativesfoo', foo => 12, format => 'txt'),
'/alternatives/12.txt', 'right path';

# Alternatives without default
$m = Mojolicious::Routes::Match->new(GET => '/alternatives2');
Expand Down

0 comments on commit df80703

Please sign in to comment.