File: comptest.tt

package info (click to toggle)
libcatalyst-devel-perl 1.42-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 360 kB
  • sloc: perl: 727; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 605 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use strict;
use warnings;
use Test::More;
[% IF long_type == 'Controller' %][% IF mech %]

unless (eval q{use Test::WWW::Mechanize::Catalyst 0.55; 1}) {
    plan skip_all => 'Test::WWW::Mechanize::Catalyst >= 0.55 required';
    exit 0;
}

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

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

use Catalyst::Test '[% app %]';
use [% class %];

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

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

done_testing();