Somewhat, but not much more sane. There are still bugs here, but this _should_ fix...
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_moose.t
CommitLineData
2167982f 1use strict;
2use warnings;
3
4use FindBin;
5use lib "$FindBin::Bin/../lib";
6
cf37d21a 7use Test::More tests => 7;
2167982f 8use Catalyst::Test 'TestApp';
9
10{
11 my $response = request('http://localhost/moose/get_attribute');
12 ok($response->is_success);
13 is($response->content, '42', 'attribute default values get set correctly');
cf37d21a 14 is($response->header('X-Catalyst-Test-Before'), 'before called', 'before works as expected');
2167982f 15}
87e41a18 16
17{
ca926e76 18 TODO: {
19 local $TODO = 'Wrapping methods in a subclass, when the subclass contains no other methods with attributes is broken';
cf37d21a 20 my $response = request('http://localhost/moose/methodmodifiers/get_attribute');
21 ok($response->is_success);
22 is($response->content, '42', 'parent controller method called');
23 is($response->header('X-Catalyst-Test-Before'), 'before called', 'before works as expected');
ca926e76 24 is($response->header('X-Catalyst-Test-After'), 'after called', 'after works as expected');
25 }
87e41a18 26}