Fix failing test
[catagits/Catalyst-Engine-SCGI.git] / t / engine-scgi.t
CommitLineData
e069caf5 1#!perl
2
3use strict;
4use warnings;
5
6use Test::More tests => 2;
7
8use_ok('Catalyst');
9
10scgi_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
7cb23d55 18 Catalyst->setup_engine('SCGI');
e069caf5 19 my $c = Catalyst->new({
20 request => $request,
21 });
e069caf5 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}