5 use lib "$FindBin::Bin/lib";
7 use Test::More tests => 5;
10 # Remove all relevant env variables to avoid accidental fail
11 foreach my $name ( grep { m{^(CATALYST)} } keys %ENV ) {
16 use Catalyst::Test 'TestApp';
20 ok( $response = request( 'http://localhost/config/' ), 'request ok' );
21 is( $response->content, 'foo', 'config ok' );
23 $response = request( 'http://localhost/appconfig/cache' );
24 ok( $response->content !~ /^__HOME__/,
25 'home dir substituted in config var'
28 $response = request( 'http://localhost/appconfig/foo' );
29 is( $response->content, 'bar', 'app finalize_config works' );
31 $response = request( 'http://localhost/appconfig/multi' );
32 my $home = TestApp->config->{ home };
34 $home, TestApp->path_to( 'x' ),
35 $home, TestApp->path_to( 'y' ) );
36 is( $response->content, $path, 'vars substituted in config var, twice' );