Fix and test failure to merge include paths
[catagits/Catalyst-Plugin-Static-Simple.git] / t / 13no_include_path.t
diff --git a/t/13no_include_path.t b/t/13no_include_path.t
new file mode 100644 (file)
index 0000000..b3d2137
--- /dev/null
@@ -0,0 +1,17 @@
+#!perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::More tests => 4;
+use Catalyst::Test 'TestApp';
+
+# test passthrough to root
+ok( my $res = request('http://localhost/images/bad.gif'), 'request ok' );
+is( $res->content_type, 'image/gif', 'root path ok' );
+
+is( scalar @{ TestApp->config->{'Plugin::Static::Simple'}->{include_path} }, 1, 'One include path used');
+is( TestApp->config->{'Plugin::Static::Simple'}->{include_path}->[0], TestApp->config->{root}, "It's the root path" );