add automatic stringification of cgi_root_path and cgi_dir options to CGIBin.
[catagits/Catalyst-Controller-WrapCGI.git] / t / cgibin_root_path.t
CommitLineData
9cd47364 1#!perl
2
3use strict;
4use warnings;
5
6use FindBin '$Bin';
7use lib "$Bin/lib";
8
f050749c 9use Test::More tests => 3;
9cd47364 10
f410f043 11# Test configurable path root and dir
053b8d71 12{ package root_test;
13
14 use Test::More;
15 use HTTP::Request::Common;
16 use Catalyst::Test 'TestCGIBinRoot';
17
18 my $response = request POST '/cgi/path/test.pl', [
19 foo => 'bar',
20 bar => 'baz'
21 ];
22
23 is($response->content, 'foo:bar bar:baz', 'POST to Perl CGI File');
24}
25
26# test another variation on specifying the root path
27{ package another_root_test;
28
29 use Test::More;
30 use HTTP::Request::Common;
31 use Catalyst::Test 'TestCGIBinRoot2';
9cd47364 32
053b8d71 33 my $response = request POST '/cgi/path/test.pl', [
34 foo => 'bar',
35 bar => 'baz'
36 ];
9cd47364 37
053b8d71 38 is($response->content, 'foo:bar bar:baz', 'POST to Perl CGI File 2');
39}
f050749c 40
41# test yet another variation on specifying the root path
42{ package root_test_3;
43
44 use Test::More;
45 use HTTP::Request::Common;
46 use Catalyst::Test 'TestCGIBinRoot3';
47
48 my $response = request POST '/cgi/path/test.pl', [
49 foo => 'bar',
50 bar => 'baz'
51 ];
52
53 is($response->content, 'foo:bar bar:baz', 'POST to Perl CGI File 3');
54}