X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_moose.t;h=74d2fee49b65368ec965be0527fef97379c4658c;hp=a5536ee09520aae0f15b43366a8df3fe85266678;hb=10542b5178b2fa036e0658111523ea68a7a04437;hpb=2167982fde3685f83594211f034e89f2fd67e336 diff --git a/t/aggregate/live_component_controller_moose.t b/t/aggregate/live_component_controller_moose.t index a5536ee..74d2fee 100644 --- a/t/aggregate/live_component_controller_moose.t +++ b/t/aggregate/live_component_controller_moose.t @@ -1,14 +1,10 @@ -#!perl - use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; -our $iters; - -use Test::More tests => 2; +use Test::More tests => 12; use Catalyst::Test 'TestApp'; { @@ -16,3 +12,25 @@ use Catalyst::Test 'TestApp'; ok($response->is_success); is($response->content, '42', 'attribute default values get set correctly'); } + +{ + my $response = request('http://localhost/moose/methodmodifiers/get_attribute'); + ok($response->is_success); + is($response->content, '42', 'parent controller method called'); + is($response->header('X-Catalyst-Test-After'), 'after called', 'after works as expected'); +} + +{ + my $response = request('http://localhost/moose/with_local_modifier'); + ok($response->is_success); + is($response->content, '42', 'attribute default values get set correctly'); + is($response->header('X-Catalyst-Test-Before'), 'before called', 'before works as expected'); +} +{ + my $response = request('http://localhost/moose/methodmodifiers/with_local_modifier'); + ok($response->is_success); + is($response->content, '42', 'attribute default values get set correctly'); + is($response->header('X-Catalyst-Test-After'), 'after called', 'after works as expected'); + is($response->header('X-Catalyst-Test-Before'), 'before called', 'before works as expected'); +} +