Acme-CPANAuthors-British
view release on metacpan or search on metacpan
t/10british.t view on Meta::CPAN
eval { $file = Acme::CPANAuthors::Utils::_cpan_packages_file() };
skip "CPAN configuration not available", 5 if($@ || !$file);
my @distros = $authors->distributions('BARBIE');
cmp_ok( ~~@distros, ">", 0, " .. \$authors->distributions('BARBIE') gives a non-empty list" );
@distros = $authors->distributions('XXXXXX');
cmp_ok( ~~@distros, "==", 0, " .. \$authors->distributions('XXXXXX') gives an empty list" );
my $name = $authors->name('DGL');
cmp_ok( length($name), ">", 0, " .. \$authors->name('DGL') gives a non-empty string" );
$name = $authors->name('BARBIE');
is($name, "Barbie", " .. \$authors->name('BARBIE') returns Barbie" );
# SKIP: {
# skip "en.gravatar.com is not available", 2
# if(pingtest('en.gravatar.com'));
#
# my $url;
# eval { $url = $authors->avatar_url('BARBIE') };
# skip "en.gravatar.com is not available", 1 if($@);
# $url ||= '';
# is($url, 'http://www.gravatar.com/avatar/2459f554c069e44527716e3f35e1d0d1', ".. \$authors->avatar_url('BARBIE') returns a URL" );
#
# eval { $url = $authors->avatar_url('BINGOS') };
# skip "en.gravatar.com is not available", 1 if($@);
# $url ||= '';
# cmp_ok( length($url), ">", 0, " .. \$authors->avatar_url('BINGOS') gives a non-empty string" );
# }
SKIP: {
skip "api.cpanauthors.org is not available", 1
if(pingtest('api.cpanauthors.org'));
my $kwalitee;
eval { $kwalitee = $authors->kwalitee('JONALLEN') };
skip "api.cpanauthors.org is not available", 1 if($@);
isa_ok( $kwalitee, "HASH", " .. \$authors->kwalitee('JONALLEN')" );
t/11companies.t view on Meta::CPAN
eval { $file = Acme::CPANAuthors::Utils::_cpan_packages_file() };
skip "CPAN configuration not available", 4 if($@ || !$file);
my @distros = $authors->distributions('FOTANGO');
cmp_ok( ~~@distros, ">", 0, " .. \$authors->distributions('FOTANGO') gives a non-empty list" );
@distros = $authors->distributions('XXXXXX');
cmp_ok( ~~@distros, "==", 0, " .. \$authors->distributions('XXXXXX') gives an empty list" );
my $name = $authors->name('GMGRD');
cmp_ok( length($name), ">", 0, " .. \$authors->name('GMGRD') gives a non-empty string" );
# SKIP: {
# skip "en.gravatar.com is not available", 1
# if(pingtest('en.gravatar.com'));
#
# my $url;
# eval { $url = $authors->avatar_url('GMGRD') };
# skip "en.gravatar.com is not available", 1 if($@);
# $url ||= '';
# cmp_ok( length($url), ">", 0, " .. \$authors->avatar_url('GMGRD') gives a non-empty string" );
# }
SKIP: {
skip "api.cpanauthors.org is not available", 1
if(pingtest('api.cpanauthors.org'));
my $kwalitee;
eval { $kwalitee = $authors->kwalitee('BBC') };
skip "api.cpanauthors.org is not available", 1 if($@);
isa_ok( $kwalitee, "HASH", " .. \$authors->kwalitee('BBC')" );
( run in 0.339 second using v1.01-cache-2.11-cpan-65fba6d93b7 )