X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F10-live_auto.t;h=782bf7da05c62be68074c1d3cc14a82cf41e23db;hb=64fa55fd5956658cf77b4d7142df46707a968c20;hp=e497bffa2d92eebfdc1be7592cca433c353c84b3;hpb=9742697f231e785f5da1aa2484d43c5f0e22239b;p=catagits%2FCatalyst-Plugin-ConfigLoader.git diff --git a/t/10-live_auto.t b/t/10-live_auto.t index e497bff..782bf7d 100644 --- a/t/10-live_auto.t +++ b/t/10-live_auto.t @@ -1,21 +1,30 @@ -use strict; -use warnings; - -use FindBin; -use lib "$FindBin::Bin/lib"; - -use Test::More tests => 4; - -use Catalyst::Test 'TestApp'; - -{ - my $response; - ok( $response = request('http://localhost/config/'), 'request ok' ); - is( $response->content, 'foo', 'config ok' ); - - $response = request('http://localhost/appconfig/cache'); - ok( $response->content !~ /^__HOME__/, 'home dir substituted in config var' ); - - $response = request('http://localhost/appconfig/foo'); - is( $response->content, 'bar', 'app finalize_config works' ); -} +use strict; +use warnings; + +use FindBin; +use lib "$FindBin::Bin/lib"; + +use Test::More tests => 5; + +use Catalyst::Test 'TestApp'; + +{ + my $response; + ok( $response = request( 'http://localhost/config/' ), 'request ok' ); + is( $response->content, 'foo', 'config ok' ); + + $response = request( 'http://localhost/appconfig/cache' ); + ok( $response->content !~ /^__HOME__/, + 'home dir substituted in config var' + ); + + $response = request( 'http://localhost/appconfig/foo' ); + is( $response->content, 'bar', 'app finalize_config works' ); + + $response = request( 'http://localhost/appconfig/multi' ); + my $home = TestApp->config->{ home }; + my $path = join( ',', + $home, TestApp->path_to( 'x' ), + $home, TestApp->path_to( 'y' ) ); + is( $response->content, $path, 'vars substituted in config var, twice' ); +}