Port t/aggregate/live_engine_request_escaped_path.t to psgi.
[catagits/Catalyst-Runtime.git] / t / aggregate / live_engine_request_escaped_path.t
CommitLineData
b4b58469 1#!/usr/bin/evn perl
7665bd7e 2use strict;
3use warnings;
4
5use FindBin;
6use lib "$FindBin::Bin/../lib";
7
8use Test::More tests => 6;
b4c31003 9use Catalyst::Test 'TestApp';
7665bd7e 10
11# test that un-escaped can be feteched.
12{
13
b4c31003 14 ok( my $response = request('http://localhost/args/params/one/two') );
7665bd7e 15 ok( $response->is_success, 'Response Successful 2xx' );
16 is( $response->content, 'onetwo' );
17}
18
19# test that request with URL-escaped code works.
a0d17f88 20{
b4c31003 21 my $response = request('http://localhost/args/param%73/one/two', {
22 extra_env => { PATH_INFO => '/args/param%73/one/two' },
23 });
7665bd7e 24
b4c31003 25 ok( $response );
7665bd7e 26 ok( $response->is_success, 'Response Successful 2xx' );
27 is( $response->content, 'onetwo' );
28}
29