}
#
+ # Complex path with multiple non-capturing pathparts
+ # PathPart('') CaptureArgs(0), PathPart('foo') CaptureArgs(0), PathPart('') Args(0)
+ # should win over PathPart('') CaptureArgs(1), PathPart('') Args(0)
+ #
+ {
+ my @expected = qw[
+ TestApp::Controller::Action::Chained->begin
+ TestApp::Controller::Action::Chained->mult_nopp2_base
+ TestApp::Controller::Action::Chained->mult_nopp2_nocap
+ TestApp::Controller::Action::Chained->mult_nopp2_action
+ TestApp::Controller::Action::Chained->mult_nopp2_action_default
+ TestApp::Controller::Action::Chained->end
+ ];
+
+ my $expected = join( ", ", @expected );
+
+ ok( my $response = request('http://localhost/chained/mult_nopp2/action'),
+ "Complex path with multiple non-capturing pathparts" );
+ is( $response->header('X-Catalyst-Executed'),
+ $expected, 'Executed actions' );
+ is( $response->content, '; ', 'Content OK' );
+ }
+
+ #
# Higher Args() hiding more specific CaptureArgs chains sections
#
{
['foo%2Fbar', 'baz%2Fquux'],
['foo%2Fbar', 'baz%2Fquux', { foo => 'bar', 'baz' => 'quux%2Ffrood'}],
['foo%2Fbar', 'baz%2Fquux', { foo => 'bar', 'baz%2Ffnoo' => 'quux%2Ffrood'}],
+ ['h%C3%BCtte', 'h%C3%BCtte', { test => 'h%C3%BCtte' } ],
) {
my $path = '/chained/roundtrip_urifor/' .
$thing->[0] . '/' . $thing->[1];
'request ' . $path . ' ok');
# Just check that the path matches, as who the hell knows or cares
# where the app is based (live tests etc)
- ok( index($content, $path) > 1, 'uri can round trip through uri_for' );
+ ok( index($content, $path) > 1, 'uri can round trip through uri_for' )
+ or diag("Expected $path, got $content");
}
}