Commit | Line | Data |
---|---|---|
239b5fc0 | 1 | use strict; |
2 | use warnings; | |
7413e76d | 3 | use Test::More; |
4 | [% IF long_type == 'Controller' %][% IF mech %] | |
239b5fc0 | 5 | |
9b153f71 | 6 | unless (eval q{use Test::WWW::Mechanize::Catalyst 0.55; 1}) { |
7 | plan skip_all => 'Test::WWW::Mechanize::Catalyst >= 0.55 required'; | |
7e6d9ba3 | 8 | exit 0; |
0c34c8b8 | 9 | } |
239b5fc0 | 10 | |
83e6e99c | 11 | ok( my $mech = Test::WWW::Mechanize::Catalyst->new(catalyst_app => '[% app %]', 'Created mech object' ); |
239b5fc0 | 12 | |
13 | $mech->get_ok( 'http://localhost[% uri %]' ); | |
7413e76d | 14 | [%- ELSE %] |
239b5fc0 | 15 | |
7413e76d | 16 | use Catalyst::Test '[% app %]'; |
17 | use [% class %]; | |
239b5fc0 | 18 | |
19 | ok( request('[% uri %]')->is_success, 'Request should succeed' ); | |
65108673 | 20 | [%- END -%] |
35124862 | 21 | [% ELSE %] |
239b5fc0 | 22 | |
23 | BEGIN { use_ok '[% class %]' } | |
65108673 | 24 | [% END -%] |
0c34c8b8 | 25 | |
26 | done_testing(); |