got all the tests running again
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_engine_fixenv-lighttpd.t
index eeb0ca0..9c71ddb 100644 (file)
@@ -38,7 +38,7 @@ sub fix_env {
     my (%input_env) = @_;
 
     my $mangled_env;
-    my $app = Catalyst->_wrapped_legacy_psgi_app(sub {
+    my $app = Catalyst->apply_default_middlewares(sub {
         my ($env) = @_;
         $mangled_env = $env;
         return [ 200, ['Content-Type' => 'text/plain'], [''] ];
@@ -51,6 +51,7 @@ sub fix_env {
 my %fixed_env = fix_env(%env);
 
 is($fixed_env{PATH_INFO}, '/bar', 'check PATH_INFO');
-ok(!exists($fixed_env{SCRIPT_NAME}), 'check SCRIPT_NAME');
+ok(!exists($fixed_env{SCRIPT_NAME}) || !length($fixed_env{SCRIPT_NAME}),
+    'check SCRIPT_NAME');
 
 done_testing;