convert tabs to spaces and set unix line endings in t/*
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Action / Detach.pm
CommitLineData
c7ded7aa 1package TestApp::Controller::Action::Detach;
2
3use strict;
4use base 'TestApp::Controller::Action';
5
6sub one : Local {
7 my ( $self, $c ) = @_;
8 $c->detach('two');
9 $c->forward('error');
10}
11
12sub two : Private {
13 my ( $self, $c ) = @_;
14 $c->forward('TestApp::View::Dump::Request');
15}
16
17sub error : Local {
18 my ( $self, $c ) = @_;
19 $c->res->output('error');
20}
21
22sub path : Local {
23 my ( $self, $c ) = @_;
24 $c->detach('/action/detach/two');
25 $c->forward('error');
26}
27
28sub with_args : Local {
29 my ( $self, $c, $orig ) = @_;
30 $c->detach( 'args', [qq/new/] );
31}
32
33sub with_method_and_args : Local {
34 my ( $self, $c, $orig ) = @_;
35 $c->detach( qw/TestApp::Controller::Action::Detach args/, [qq/new/] );
36}
37
38sub args : Local {
39 my ( $self, $c, $val ) = @_;
40 die "Expected argument 'new', got '$val'" unless $val eq 'new';
41 die "passed argument does not match args" unless $val eq $c->req->args->[0];
42 $c->res->body( $c->req->args->[0] );
43}
44
451;