[Catalyst-commits] r9071 - in Catalyst-Runtime/5.80/trunk: . lib/Catalyst t

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Mon Jan 12 04:46:50 GMT 2009


Author: t0m
Date: 2009-01-12 04:46:50 +0000 (Mon, 12 Jan 2009)
New Revision: 9071

Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/TODO
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm
   Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t
Log:
Sort out CatalystX::CRUD issues

Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2009-01-12 04:46:43 UTC (rev 9070)
+++ Catalyst-Runtime/5.80/trunk/Changes	2009-01-12 04:46:50 UTC (rev 9071)
@@ -1,6 +1,10 @@
 # This file documents the revision history for Perl extension Catalyst.
 
 5.8000_05
+        - Passing request method exported by Catalyst::Test an extra
+          parameter used to be ignored, but started breaking if the parameter
+          was not a hash in 5.8000_04. Extra parameter is now ignored if
+          it isn't a hashref (t0m)
         - Fix request argumentss getting corrupted if you override the 
           dispatcher and call an action which detaches (for 
           Catalyst::Plugin::Authorization::ACL) (t0m)

Modified: Catalyst-Runtime/5.80/trunk/TODO
===================================================================
--- Catalyst-Runtime/5.80/trunk/TODO	2009-01-12 04:46:43 UTC (rev 9070)
+++ Catalyst-Runtime/5.80/trunk/TODO	2009-01-12 04:46:50 UTC (rev 9071)
@@ -10,13 +10,11 @@
        and which not, like NEXT does. Log::Log4perl needs to be fixed and the
        problem should be described in Upgrading.pod. (rafl)
 
-     - CatalystX-CRUD-ModelAdapter-DBIC
-       fail tests against 5.80 (karpet)
-
      - Waiting on new releases:
        - Catalyst::Plugin::Authentication - 0.100092
        - Catalyst::Action::RenderView     - 0.08
        - Catalyst::Plugin::DebugCookie    - 0.999002
+       - CatalystX::CRUD                  - 0.38
 
 Documentation:
 

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm	2009-01-12 04:46:43 UTC (rev 9070)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Test.pm	2009-01-12 04:46:50 UTC (rev 9071)
@@ -255,6 +255,7 @@
 sub _customize_request {
     my $request = shift;
     my $opts = pop(@_) || {};
+    $opts = {} unless ref($opts) eq 'HASH';
     if ( my $host = exists $opts->{host} ? $opts->{host} : $default_host  ) {
         $request->header( 'Host' => $host );
     }

Modified: Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t	2009-01-12 04:46:43 UTC (rev 9070)
+++ Catalyst-Runtime/5.80/trunk/t/unit_load_catalyst_test.t	2009-01-12 04:46:50 UTC (rev 9071)
@@ -7,8 +7,9 @@
 use FindBin qw/$Bin/;
 use lib "$Bin/lib";
 use Catalyst::Utils;
+use HTTP::Request::Common;
 
-plan tests => 9;
+plan tests => 11;
 
 use_ok('Catalyst::Test');
 
@@ -18,6 +19,8 @@
 eval "request('http://localhost')";
 isnt( $@, "", "request returns an error message with no app specified");
 
+# FIXME - These vhosts in tests tests should be somewhere else...
+
 sub customize { Catalyst::Test::_customize_request(@_) }
 
 {
@@ -55,3 +58,11 @@
 
 # Back compat test, extra args used to be ignored, now a hashref of options.
 use_ok('Catalyst::Test', 'TestApp', 'foobar');
+
+# Back compat test, ensure that request ignores anything which isn't a hash.
+lives_ok {
+    request(GET('/dummy'), 'foo');
+} 'scalar additional param to request method ignored';
+lives_ok {
+    request(GET('/dummy'), []);
+} 'array additional param to request method ignored';




More information about the Catalyst-commits mailing list