[Catalyst-commits] r11468 - in Catalyst-Runtime/5.80/trunk: .
lib/Catalyst t
ilmari at dev.catalyst.perl.org
ilmari at dev.catalyst.perl.org
Tue Oct 6 15:30:41 GMT 2009
Author: ilmari
Date: 2009-10-06 15:30:41 +0000 (Tue, 06 Oct 2009)
New Revision: 11468
Modified:
Catalyst-Runtime/5.80/trunk/Changes
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm
Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t
Log:
Set ->request on the response object i Catalyst::Test::local_request--This line, and those below, will be ignored--
M t/unit_load_catalyst_test.t
M lib/Catalyst/Test.pm
M Changes
Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes 2009-10-06 08:44:54 UTC (rev 11467)
+++ Catalyst-Runtime/5.80/trunk/Changes 2009-10-06 15:30:41 UTC (rev 11468)
@@ -8,6 +8,7 @@
as there is no recommended alternative.
- Improved the suggested fix warning when component resolution uses regex
fallback for fully qualified component names.
+ - Catalyst::Test::local_request sets ->request on the response.
New features:
- Added disable_component_resolution_regex_fallback config option to
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm 2009-10-06 08:44:54 UTC (rev 11467)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm 2009-10-06 15:30:41 UTC (rev 11468)
@@ -228,7 +228,9 @@
$class->handle_request( env => \%ENV );
- return $cgi->restore->response;
+ my $response = $cgi->restore->response;
+ $response->request( $request );
+ return $response;
}
my $agent;
Modified: Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t 2009-10-06 08:44:54 UTC (rev 11467)
+++ Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t 2009-10-06 15:30:41 UTC (rev 11468)
@@ -5,7 +5,7 @@
use FindBin;
use lib "$FindBin::Bin/lib";
-use Test::More tests => 59;
+use Test::More tests => 61;
use FindBin qw/$Bin/;
use lib "$Bin/lib";
use Catalyst::Utils;
@@ -89,6 +89,9 @@
" 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";
} }
}
More information about the Catalyst-commits
mailing list