Commit | Line | Data |
239b5fc0 |
1 | use strict; |
2 | use warnings; |
3 | [% IF long_type == 'Controller' %][% IF mech %]use Test::More; |
4 | |
6fce1f9f |
5 | eval "use Test::WWW::Mechanize::Catalyst '[% name %]'"; |
239b5fc0 |
6 | plan $@ |
7 | ? ( skip_all => 'Test::WWW::Mechanize::Catalyst required' ) |
8 | : ( tests => 2 ); |
9 | |
10 | ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' ); |
11 | |
12 | $mech->get_ok( 'http://localhost[% uri %]' ); |
13 | [% ELSE %]use Test::More tests => 3; |
14 | |
6fce1f9f |
15 | BEGIN { use_ok 'Catalyst::Test', '[% name %]' } |
239b5fc0 |
16 | BEGIN { use_ok '[% class %]' } |
17 | |
18 | ok( request('[% uri %]')->is_success, 'Request should succeed' ); |
19 | [% END %] |
20 | [% ELSE %]use Test::More tests => 1; |
21 | |
22 | BEGIN { use_ok '[% class %]' } |
23 | [% END %] |