View::TT, updated README
[catagits/Catalyst-View-TT.git] / t / 06includepath.t
CommitLineData
425f7060 1use strict;
2use warnings;
3a4ffa2a 3use Test::More tests => 9;
425f7060 4
5use FindBin;
6use lib "$FindBin::Bin/lib";
7
8use_ok('Catalyst::Test', 'TestApp');
9my $response;
10
3a4ffa2a 11ok(($response = request("/test_includepath?view=Appconfig&template=testpath.tt&additionalpath=test_include_path"))->is_success, 'additional_template_path');
425f7060 12is($response->content, TestApp->config->{default_message}, 'message ok');
13
3a4ffa2a 14ok(($response = request("/test_includepath?view=Includepath&template=testpath.tt"))->is_success, 'scalar include path from config');
15is($response->content, TestApp->config->{default_message}, 'message ok');
16
17ok(($response = request("/test_includepath?view=Includepath2&template=testpath.tt"))->is_success, 'object ref (that stringifys to the path) include path from config');
18is($response->content, TestApp->config->{default_message}, 'message ok');
425f7060 19
3a4ffa2a 20ok(($response = request("/test_includepath?view=Includepath3&template=testpath.tt&addpath=test_include_path"))->is_success, 'array ref include path from config not replaced by another array');
425f7060 21is($response->content, TestApp->config->{default_message}, 'message ok');
22