Merged 5.49_01 (r1339) from refactored branch to trunk
[catagits/Catalyst-Runtime.git] / t / live / lib / TestApp / Controller / Engine / Response / Redirect.pm
diff --git a/t/live/lib/TestApp/Controller/Engine/Response/Redirect.pm b/t/live/lib/TestApp/Controller/Engine/Response/Redirect.pm
new file mode 100644 (file)
index 0000000..f7d7ec0
--- /dev/null
@@ -0,0 +1,29 @@
+package TestApp::Controller::Engine::Response::Redirect;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub one : Relative {
+    my ( $self, $c ) = @_;
+    $c->response->redirect('/test/writing/is/boring');
+}
+
+sub two : Relative {
+    my ( $self, $c ) = @_;
+    $c->response->redirect('http://www.google.com/');
+}
+
+sub three : Relative {
+    my ( $self, $c ) = @_;
+    $c->response->redirect('http://www.google.com/');
+    $c->response->status(301); # Moved Permanently
+}
+
+sub four : Relative {
+    my ( $self, $c ) = @_;
+    $c->response->redirect('http://www.google.com/');
+    $c->response->status(307); # Temporary Redirect
+}
+
+1;
+