stop using Moo as a test package
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_moose.t
index a9a3ccf..74d2fee 100644 (file)
@@ -4,7 +4,7 @@ use warnings;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
 
-use Test::More tests => 2;
+use Test::More tests => 12;
 use Catalyst::Test 'TestApp';
 
 {
@@ -12,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');
+}
+