Test for basename fixes
Tomas Doran [Thu, 18 Dec 2008 00:53:44 +0000 (00:53 +0000)]
Changes
t/aggregate/live_engine_request_uploads.t

diff --git a/Changes b/Changes
index 1882335..f92595c 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+        - Fix bug causing Catalyst::Request::Upload's basename method
+          to return undef (t0m)
+          - Test for this (Carl Franks)
         - Fix loading of classes which do not define any symbols to not
           die, as it didn't in 5.70 (t0m)
           - Test for this (t0m)
@@ -20,7 +23,6 @@
           Catalyst::Engine::CGI: _header_buf
           Catalyst::Engine::HTTP: options, _keepalive, _write_error
           Catalyst::Request: _path
-          Catalyst::Request::Upload: basename
           Catalyst::Stats: tree
           (t0m)
         - Fix issues in Catalyst::Controller::WrapCGI 
index 47913db..df98f08 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
 
-use Test::More tests => 101;
+use Test::More tests => 105;
 use Catalyst::Test 'TestApp';
 
 use Catalyst::Request;
@@ -134,6 +134,7 @@ use Path::Class::Dir;
         is( $upload->type, $part->content_type, 'Upload Content-Type' );
         is( $upload->filename, $parameters{filename}, 'Upload filename' );
         is( $upload->size, length( $part->content ), 'Upload Content-Length' );
+        is( $upload->basename, $parameters{filename}, 'Upload basename' );
 
         SKIP:
         {
@@ -276,6 +277,7 @@ use Path::Class::Dir;
         is( $upload->type, $part->content_type, 'Upload Content-Type' );
         is( $upload->size, length( $part->content ), 'Upload Content-Length' );
         is( $upload->filename, 'catalyst_130pix.gif', 'Upload Filename' );
+        is( $upload->basename, 'catalyst_130pix.gif', 'Upload basename' );
         
         SKIP:
         {