From: Ferruccio Zamuner Date: Fri, 10 Dec 2010 10:22:41 +0000 (+0000) Subject: Found a another fault in chained action dispatcher. X-Git-Tag: 5.80030~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=13f911efd2cfb317ad1b41968a8c06c3f0a74f52 Found a another fault in chained action dispatcher. --- diff --git a/t/aggregate/live__component_controller_action_chained2.t b/t/aggregate/live__component_controller_action_chained2.t index 199db81..84d54ce 100644 --- a/t/aggregate/live__component_controller_action_chained2.t +++ b/t/aggregate/live__component_controller_action_chained2.t @@ -16,6 +16,11 @@ content_like('/account/ferz', qr/This is account ferz/, 'account'); 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; diff --git a/t/lib/ChainedActionsApp/Controller/Root.pm b/t/lib/ChainedActionsApp/Controller/Root.pm index a436087..07d0d2e 100644 --- a/t/lib/ChainedActionsApp/Controller/Root.pm +++ b/t/lib/ChainedActionsApp/Controller/Root.pm @@ -60,6 +60,22 @@ sub profile : Chained('profile_base') PathPart('') Args(1) { $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' );