Remove overridden prepare_path that was mangling the applicaiton prefix
[catagits/Catalyst-Engine-SCGI.git] / t / engine-scgi.t
1 #!perl
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 2;
7
8 use_ok('Catalyst');
9
10 scgi_application_prefix: {
11     my $request = Catalyst::Request->new;
12
13     $ENV{HTTP_HOST} = "127.0.0.1";
14     $ENV{SERVER_PORT} = 80;
15     $ENV{SCRIPT_NAME} = '/MyApp';
16     $ENV{PATH_INFO} = '/some/path';
17
18     my $c = Catalyst->new({
19       request => $request,
20     });
21     $c->setup_engine('SCGI');
22     $c->prepare_path;
23
24     is (
25         Catalyst::uri_for( $c, '/some/path' )->as_string,
26         'http://127.0.0.1/MyApp/some/path',
27         'uri_for creates url with correct application prefix'
28     );
29 }