X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive%2Fcomponent%2Fcontroller%2Faction%2Fdefault.t;h=0354c95c59091177df9d69bc07150cbad69c5813;hb=746380d1782b04934f7fafe76d96d32c97379994;hp=93e9de26826133a29defdcbbe844b96376453415;hpb=d8c66af52b5353c93b1816e19c0f1cac69bc5ad1;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live/component/controller/action/default.t b/t/live/component/controller/action/default.t index 93e9de2..0354c95 100644 --- a/t/live/component/controller/action/default.t +++ b/t/live/component/controller/action/default.t @@ -6,7 +6,7 @@ use warnings; use FindBin; use lib "$FindBin::Bin/../../../lib"; -use Test::More tests => 90; +use Test::More tests => 120; use Catalyst::Test 'TestApp'; for ( 1 .. 10 ) { @@ -40,4 +40,14 @@ for ( 1 .. 10 ) { ok( $response = request('http://localhost/foo/bar/action'), 'Request' ); is( $response->code, 404, 'Invalid URI returned 404' ); } + + # test that args are passed properly to default + { + my $creq; + my $expected = [ qw/action default arg1 arg2/ ]; + + ok( my $response = request('http://localhost/action/default/arg1/arg2'), 'Request' ); + ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' ); + is_deeply( $creq->{arguments}, $expected, 'Arguments ok' ); + } }