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