added Test::Pod support
[catagits/Catalyst-Runtime.git] / t / 10forward.t
diff --git a/t/10forward.t b/t/10forward.t
new file mode 100644 (file)
index 0000000..934c058
--- /dev/null
@@ -0,0 +1,21 @@
+package TestApp;
+
+use Catalyst qw[-Engine=Test];
+
+__PACKAGE__->action(
+    foo => sub {
+        my ( $self, $c ) = @_;
+        $c->forward('bar');
+    },
+    bar => sub {
+        my ( $self, $c, $arg ) = @_;
+        $c->res->output($arg);
+    }
+);
+
+package main;
+
+use Test::More tests => 1;
+use Catalyst::Test 'TestApp';
+
+ok( get('/foo/bar') =~ /bar/ );