X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FCatty.pm;h=83e6745d1f6896b9f17e98ff1cfa53674bdf2667;hb=affa35d5063fbeb1ca9ccc5bff2372b583c8575f;hp=f9285d095bf555b721c61bfc53e1de06bdeaade6;hpb=1f8dbf856d8b4e418abf82e0929c0614912caa0f;p=catagits%2FTest-WWW-Mechanize-Catalyst.git diff --git a/t/lib/Catty.pm b/t/lib/Catty.pm index f9285d0..83e6745 100644 --- a/t/lib/Catty.pm +++ b/t/lib/Catty.pm @@ -1,6 +1,7 @@ package Catty; use strict; +use warnings; #use Catalyst; use Catalyst; @@ -76,6 +77,13 @@ sub check_auth_basic : Global { } } +sub redirect_with_500 : Global { + my ( $self, $c ) = @_; + $DB::single = 1; + $c->res->redirect( $c->uri_for("/bonjour")); + die "erk!"; +} + sub die : Global { my ( $self, $context ) = @_; my $html = html( "Die", "This is the die page" ); @@ -127,5 +135,14 @@ sub gzipped : Global { $c->response->headers->push_header( 'Vary', 'Accept-Encoding' ); } +sub user_agent : Global { + my ( $self, $c ) = @_; + + my $html = html($c->req->user_agent, $c->req->user_agent); + $c->response->content_type("text/html; charset=utf-8"); + $c->response->output( $html ); + +} + 1;