Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
a few more route normalization tests
  • Loading branch information
kraih committed Feb 15, 2014
1 parent 573bf89 commit 0239adb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,4 +1,6 @@

4.82 2014-02-16

4.81 2014-02-15
- Added direct array access for child nodes to Mojo::DOM.
- Improved Mojolicious::Routes::Pattern to normalize more route variations.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -43,7 +43,7 @@ has types => sub { Mojolicious::Types->new };
has validator => sub { Mojolicious::Validator->new };

our $CODENAME = 'Top Hat';
our $VERSION = '4.81';
our $VERSION = '4.82';

sub AUTOLOAD {
my $self = shift;
Expand Down
6 changes: 3 additions & 3 deletions t/mojolicious/routes.t
Expand Up @@ -13,7 +13,7 @@ $r->route('/clean')->to(clean => 1)->name('very_clean');
$r->route('/clean/too')->to(something => 1);

# /0
$r->route('/0')->to(null => 1);
$r->route('0')->to(null => 1);

# /alternatives
# /alternatives/0
Expand All @@ -24,7 +24,7 @@ $r->route('/alternatives/:foo', foo => [qw(0 test 23)])->to(foo => 11);
# /alternatives2/0
# /alternatives2/test
# /alternatives2/23
$r->route('/alternatives2/:foo', foo => [qw(0 test 23)]);
$r->route('/alternatives2/:foo/', foo => [qw(0 test 23)]);

# /alternatives3/foo
# /alternatives3/foobar
Expand All @@ -51,7 +51,7 @@ $r->route('/:controller/testedit')->to(action => 'testedit');
$test->route('/delete/(id)', id => qr/\d+/)->to(action => 'delete', id => 23);

# /test2
my $test2 = $r->bridge('/test2')->to(controller => 'test2');
my $test2 = $r->bridge('/test2/')->to(controller => 'test2');

# /test2 (inline)
my $test4 = $test2->bridge('/')->to(controller => 'index');
Expand Down

0 comments on commit 0239adb

Please sign in to comment.