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=833861f12b5fdbec19f2163e8fd3c3233356e260;hp=6ed86bad0d69008a63e289911dcc2f9fd96bc36e;hb=88e5a8b0c4d28e46b8ba6b6b9567063e57af9063;hpb=ca926e765a9c0c8f2debe5ccda2c15a2c6354da2 diff --git a/t/aggregate/live_component_controller_moose.t b/t/aggregate/live_component_controller_moose.t index 6ed86ba..833861f 100644 --- a/t/aggregate/live_component_controller_moose.t +++ b/t/aggregate/live_component_controller_moose.t @@ -4,7 +4,7 @@ use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; -use Test::More tests => 5; +use Test::More tests => 12; use Catalyst::Test 'TestApp'; { @@ -17,8 +17,20 @@ use Catalyst::Test 'TestApp'; my $response = request('http://localhost/moose/methodmodifiers/get_attribute'); ok($response->is_success); is($response->content, '42', 'parent controller method called'); - TODO: { - local $TODO = 'Wrapping methods in a subclass, when the subclass contains no other methods with attributes is broken'; - is($response->header('X-Catalyst-Test-After'), 'after called', 'after works as expected'); - } + 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'); +} +