fixed _get_component_type's regexp's
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_container_live_auto.t
CommitLineData
ffc0b0d8 1use strict;
2use warnings;
3
4use FindBin;
5use lib "$FindBin::Bin/../lib";
6
7use Test::More tests => 5;
8
9use Catalyst::Test 'TestAppContainer';
10
11{
12 my $response;
13 ok( $response = request( 'http://localhost/config/' ), 'request ok' );
14 is( $response->content, 'foo', 'config ok' );
15
16 $response = request( 'http://localhost/appconfig/cache' );
17 ok( $response->content && $response->content !~ /^__HOME__/,
18 'home dir substituted in config var'
19 );
20
21 $response = request( 'http://localhost/appconfig/foo' );
22 is( $response->content, 'bar', 'app finalize_config works' );
23
24 $response = request( 'http://localhost/appconfig/multi' );
25 my $home = TestAppContainer->config->{ home };
26 my $path = join( ',',
27 $home, TestAppContainer->path_to( 'x' ),
28 $home, TestAppContainer->path_to( 'y' ) );
29 is( $response->content, $path, 'vars substituted in config var, twice' );
30}