-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7823bdd
commit 0bae716
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::Most tests => 3; | ||
|
||
NOBUGS: { | ||
SKIP: { | ||
if($ENV{AUTHOR_TESTING}) { | ||
eval 'use WWW::RT::CPAN'; # FIXME: use a REST client | ||
if($@) { | ||
diag('WWW::RT::CPAN required to check for open tickets'); | ||
skip('WWW::RT::CPAN required to check for open tickets', 3); | ||
} elsif(my @rc = @{WWW::RT::CPAN::list_dist_active_tickets(dist => 'Data-Fetch')}) { | ||
ok($rc[0] == 200); | ||
ok($rc[1] eq 'OK'); | ||
my @tickets = $rc[2] ? @{$rc[2]} : (); | ||
|
||
foreach my $ticket(@tickets) { | ||
diag($ticket->{id}, ': ', $ticket->{title}, ', broken since ', $ticket->{'broken_in'}[0]); | ||
} | ||
ok(scalar(@tickets) == 0); | ||
} else { | ||
diag("Can't connect to rt.cpan.org"); | ||
skip("Can't connect to rt.cpan.org", 3); | ||
} | ||
} else { | ||
diag('Author tests not required for installation'); | ||
skip('Author tests not required for installation', 3); | ||
} | ||
} | ||
} |