X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=blobdiff_plain;f=t%2Flib%2FTest%2FCatalyst%2FAction%2FREST%2FController%2FActionsForBrowsers.pm;fp=t%2Flib%2FTest%2FCatalyst%2FAction%2FREST%2FController%2FActionsForBrowsers.pm;h=d9eb184ace87d1c6add4e48396f4d4a9623fe887;hp=0000000000000000000000000000000000000000;hb=83273f945c722f1a05e584fb44c8664c1ab4c4b4;hpb=295fe4d5174e7e34fc1a4999981f29e96bd9709a diff --git a/t/lib/Test/Catalyst/Action/REST/Controller/ActionsForBrowsers.pm b/t/lib/Test/Catalyst/Action/REST/Controller/ActionsForBrowsers.pm new file mode 100644 index 0000000..d9eb184 --- /dev/null +++ b/t/lib/Test/Catalyst/Action/REST/Controller/ActionsForBrowsers.pm @@ -0,0 +1,32 @@ +package Test::Catalyst::Action::REST::Controller::ActionsForBrowsers; +use Moose; +use namespace::autoclean; + +BEGIN { extends qw/Catalyst::Controller::REST/ } + +sub begin {} # Don't need serialization.. + +sub for_browsers : Local : ActionClass('REST::ForBrowsers') { + my ( $self, $c ) = @_; + $c->res->header('X-Was-In-TopLevel', 1); +} + +sub for_browsers_GET : Private { + my ( $self, $c ) = @_; + $c->res->body('GET'); +} + +sub for_browsers_GET_html : Private { + my ( $self, $c ) = @_; + $c->res->body('GET_html'); +} + +sub for_browsers_POST : Private { + my ( $self, $c ) = @_; + $c->res->body('POST'); +} + +sub end : Private {} # Don't need serialization.. + +1; +