content_like('/account/123', qr/This is account 123/, 'account');
content_like('/account/profile/007/James Bond', qr/This is profile of James Bond/, 'account');
+TODO: {
+ local $TODO = q(new chained action test case that fails yet.);
+ content_like('/downloads/', qr/This is downloads index/, 'downloads');
+}
+
action_notfound('/c');
done_testing;
$c->response->body( "This is profile of " . $acc );
}
+=head2 downloads
+
+ This is a different test, this function is void, just to let following in the chain
+ to declare downloads as PathPart.
+
+=cut
+
+sub downloads : Chained('setup') PathPart('') CaptureArgs(0) {
+ my($self,$c) = @_;
+}
+
+sub downloads_index : Chained('downloads') PathPart('downloads') Args(0) {
+ my($self,$c) = @_;
+ $c->response->body( "This is download index");
+}
+
sub default : Chained('setup') PathPart('') Args() {
my ( $self, $c ) = @_;
$c->response->body( 'Page not found' );