Remove use of Catalyst::Base from the tests
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Engine / Response / Cookies.pm
1 package TestApp::Controller::Engine::Response::Cookies;
2
3 use strict;
4 use base 'Catalyst::Controller';
5
6 sub one : Local {
7     my ( $self, $c ) = @_;
8     $c->res->cookies->{catalyst} = { value => 'cool',     path => '/bah' };
9     $c->res->cookies->{cool}     = { value => 'catalyst', path => '/' };
10     $c->forward('TestApp::View::Dump::Request');
11 }
12
13 sub two : Local {
14     my ( $self, $c ) = @_;
15     $c->res->cookies->{catalyst} = { value => 'cool',     path => '/bah' };
16     $c->res->cookies->{cool}     = { value => 'catalyst', path => '/' };
17     $c->res->redirect('http://www.google.com/');
18 }
19
20 sub three : Local {
21     my ( $self, $c ) = @_;
22
23     $c->res->cookies->{object} = CGI::Simple::Cookie->new(
24         -name => "this_is_the_real_name",
25         -value => [qw/foo bar/],
26     );
27
28     $c->res->cookies->{hash} = {
29         value => [qw/a b c/],
30     };
31
32     $c->forward('TestApp::View::Dump::Request');
33 }
34
35 1;