Unicode plugin: import tests and update current ones
[catagits/Catalyst-Runtime.git] / t / unicode_plugin_config.t
1 #!/usr/bin/env perl
2
3 use strict;
4 use warnings;
5 use Test::More;
6
7 BEGIN { $ENV{TESTAPP_ENCODING} = 'UTF-8' };
8
9 # setup library path
10 use FindBin qw($Bin);
11 use lib "$Bin/lib";
12
13 BEGIN {
14 if ( !eval { require Test::WWW::Mechanize::Catalyst } || ! Test::WWW::Mechanize::Catalyst->VERSION('0.51') ) {
15     plan skip_all => 'Need Test::WWW::Mechanize::Catalyst for this test';
16 }
17 }
18
19 # make sure testapp works
20 use_ok('TestAppUnicode');
21
22 use Test::WWW::Mechanize::Catalyst 'TestAppUnicode';
23 my $mech = Test::WWW::Mechanize::Catalyst->new;
24
25 {
26     TestAppUnicode->encoding('UTF-8');
27     $mech->get_ok('http://localhost/unicode', 'encoding configured ok');
28 }
29
30 done_testing;
31