ff5420c1ff79dadc71876d455308a4247108bb7a
[catagits/Catalyst-Devel.git] / share / t / comptest.tt
1 use strict;
2 use warnings;
3 use Test::More;
4 [% IF long_type == 'Controller' %][% IF mech %]
5
6 unless (eval q{use Test::WWW::Mechanize::Catalyst '[% name %]'; 1}) {
7     plan skip_all => 'Test::WWW::Mechanize::Catalyst required';
8     exit 0;
9 }
10
11 ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' );
12
13 $mech->get_ok( 'http://localhost[% uri %]' );
14 [%- ELSE %]
15
16 use Catalyst::Test '[% app %]';
17 use [% class %];
18
19 ok( request('[% uri %]')->is_success, 'Request should succeed' );
20 [%- END -%]
21 [% ELSE %]use Test::More;
22
23 BEGIN { use_ok '[% class %]' }
24 [% END -%]
25
26 done_testing();