-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path300-controller_config.t
38 lines (34 loc) · 1.07 KB
/
300-controller_config.t
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
27
28
29
30
31
32
33
34
35
36
37
38
use strict;
use warnings;
use Test::More;
BEGIN {
plan skip_all => 'backends required' if(!-s 'thruk_local.conf' and !defined $ENV{'CATALYST_SERVER'});
plan tests => 157;
}
BEGIN {
use lib('t');
require TestUtils;
import TestUtils;
}
BEGIN { use_ok 'Thruk::Controller::config' }
my $pages = [
'/thruk/cgi-bin/config.cgi',
'/thruk/cgi-bin/config.cgi?type=hosts',
'/thruk/cgi-bin/config.cgi?type=hostdependencies',
'/thruk/cgi-bin/config.cgi?type=hostescalations',
'/thruk/cgi-bin/config.cgi?type=hostgroups',
'/thruk/cgi-bin/config.cgi?type=services',
'/thruk/cgi-bin/config.cgi?type=servicegroups',
'/thruk/cgi-bin/config.cgi?type=servicedependencies',
'/thruk/cgi-bin/config.cgi?type=serviceescalations',
'/thruk/cgi-bin/config.cgi?type=contacts',
'/thruk/cgi-bin/config.cgi?type=contactgroups',
'/thruk/cgi-bin/config.cgi?type=timeperiods',
'/thruk/cgi-bin/config.cgi?type=commands',
];
for my $url (@{$pages}) {
TestUtils::test_page(
'url' => $url,
'like' => 'Configuration',
);
}