X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Funit_load_catalyst_test.t;h=399b190489d9967e64fef31114b36a40c423e4c2;hb=8e03d1bada5e205dbe4b9aad181ed606dd04dc4e;hp=ffa5655974feca1682e13ca68bc9c63426b7c5ca;hpb=737a1e422e33f1889058373b0b1536b1b8c268db;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/unit_load_catalyst_test.t b/t/aggregate/unit_load_catalyst_test.t index ffa5655..399b190 100644 --- a/t/aggregate/unit_load_catalyst_test.t +++ b/t/aggregate/unit_load_catalyst_test.t @@ -3,11 +3,9 @@ use strict; use warnings; -use FindBin; -use lib "$FindBin::Bin/lib"; -use Test::More tests => 59; +use Test::More; use FindBin qw/$Bin/; -use lib "$Bin/lib"; +use lib "$Bin/../lib"; use Catalyst::Utils; use HTTP::Request::Common; use Test::Exception; @@ -26,7 +24,7 @@ my %Meth = ( ### make sure we're not trying to connect to a remote host -- these are local tests local $ENV{CATALYST_SERVER}; -use_ok( $Class ); +use Catalyst::Test (); ### check available methods { ### turn of redefine warnings, we'll get new subs exported @@ -89,6 +87,9 @@ use_ok( $Class ); " Content recorded in response" ); ok( $c->stash, " Stash accessible" ); ok( $c->action, " Action object accessible" ); + ok( $res->request, " Response has request object" ); + lives_and { is( $res->request->uri, $Url) } + " Request object has correct url"; } } } @@ -106,7 +107,7 @@ use_ok( $Class ); # FIXME - These vhosts in tests tests should be somewhere else... -sub customize { Catalyst::Test::_customize_request(@_) } +sub customize { Catalyst::Test::_customize_request($_[0], {}, @_[1 .. $#_]) } { my $req = Catalyst::Utils::request('/dummy'); @@ -152,3 +153,4 @@ lives_ok { request(GET('/dummy'), []); } 'array additional param to request method ignored'; +done_testing;