use strict;
use warnings;
[% IF long_type == 'Controller' %][% IF mech %]use Test::More;

eval "use Test::WWW::Mechanize::Catalyst '[% name %]'";
if ($@) {
    plan skip_all => 'Test::WWW::Mechanize::Catalyst required';
    exit 0;
}

ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' );

$mech->get_ok( 'http://localhost[% uri %]' );
[%- ELSE %]use Test::More;

BEGIN { use_ok 'Catalyst::Test', '[% app %]' }
BEGIN { use_ok '[% class %]' }

ok( request('[% uri %]')->is_success, 'Request should succeed' );
[%- END -%]
[% ELSE %]use Test::More;

BEGIN { use_ok '[% class %]' }
[% END -%]

done_testing();
