Unicode plugin: import tests and update current ones
[catagits/Catalyst-Runtime.git] / t / unicode_plugin_config.t
diff --git a/t/unicode_plugin_config.t b/t/unicode_plugin_config.t
new file mode 100644 (file)
index 0000000..513c978
--- /dev/null
@@ -0,0 +1,31 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN { $ENV{TESTAPP_ENCODING} = 'UTF-8' };
+
+# setup library path
+use FindBin qw($Bin);
+use lib "$Bin/lib";
+
+BEGIN {
+if ( !eval { require Test::WWW::Mechanize::Catalyst } || ! Test::WWW::Mechanize::Catalyst->VERSION('0.51') ) {
+    plan skip_all => 'Need Test::WWW::Mechanize::Catalyst for this test';
+}
+}
+
+# make sure testapp works
+use_ok('TestAppUnicode');
+
+use Test::WWW::Mechanize::Catalyst 'TestAppUnicode';
+my $mech = Test::WWW::Mechanize::Catalyst->new;
+
+{
+    TestAppUnicode->encoding('UTF-8');
+    $mech->get_ok('http://localhost/unicode', 'encoding configured ok');
+}
+
+done_testing;
+