-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathblockers.t
34 lines (24 loc) · 954 Bytes
/
blockers.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
# Test for open blocker tickets
use strict;
use warnings;
use Test::More;
use LWP::UserAgent;
# Don't run tests for installs
unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
}
plan tests => 2;
my $ua = LWP::UserAgent->new;
$ua->timeout(30);
$ua->env_proxy;
my $response = $ua->get(
'http://padre.perlide.org/trac/query?priority=blocker&status=accepted&status=assigned&status=new&status=reopened&col=id&order=priority'
);
ok( $response->is_success, 'Got HTTP status OK' );
# Count the number of blockers
# once this is working properly, for now we'll just check if we get No tickets found
# my $tickets = () = $response->decoded_content, qr/<a href="?\/trac\/ticket\/(\d+)"?[^>]*>\#\1<\/a/;
#is( $tickets, 0, 'No open blocker tickets' );
$response->content =~ m!(No tickets found)!;
my $tickets = $1;
is( $tickets, "No tickets found", 'No open blocker tickets' );