use FindBin;
use lib "$FindBin::Bin/../lib";
-use Test::More tests => 2;
+use Test::More tests => 4;
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->header('X-Catalyst-Test-After'), 'after called', 'after works as expected');
+}
--- /dev/null
+package TestApp::Controller::Moose::MethodModifiers;
+use Moose;
+BEGIN { extends qw/TestApp::Controller::Moose/; }
+
+after get_attribute => sub {
+ my ($self, $c) = @_;
+ $c->response->header( 'X-Catalyst-Test-After' => 'after called' );
+};
+
+1;