Fix and test failure to merge include paths
[catagits/Catalyst-Plugin-Static-Simple.git] / t / 14deprecated.t
diff --git a/t/14deprecated.t b/t/14deprecated.t
new file mode 100644 (file)
index 0000000..efe758e
--- /dev/null
@@ -0,0 +1,22 @@
+#!perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::More tests => 5;
+use Catalyst::Test 'IncTestApp';
+
+is( $TestLog::logged, "Deprecated 'static' config key used, please use the key 'Plugin::Static::Simple' instead",
+    "Got warning" );
+
+# test overlay dir
+ok( my $res = request('http://localhost/overlay.jpg'), 'request ok' );
+is( $res->content_type, 'image/jpeg', 'overlay path ok' );
+
+# test passthrough to root
+ok( $res = request('http://localhost/images/bad.gif'), 'request ok' );
+is( $res->content_type, 'image/gif', 'root path ok' );
+