Use Test::RequiresInternet
[www-search-coveralia.git] / t / artists.t
CommitLineData
a97b490d
MG
1#!/usr/bin/perl
2use v5.14;
3use warnings;
4
5use List::Util qw/first/;
6use WWW::Search::Test;
7
ff5b31da 8use Test::RequiresInternet qw/www.coveralia.com 80/;
a97b490d
MG
9use Test::More tests => 9;
10
11tm_new_engine('Coveralia::Artists');
12tm_run_test_no_approx(normal => $WWW::Search::Test::bogus_query, 0, 0);
13tm_run_test_no_approx(normal => 'Metallica', 1, 10);
14my $result = first { $_->title eq 'Metallica' } $WWW::Search::Test::oSearch->results;
15my @albums = $result->albums;
16
17$result = first { $_->title eq 'And Justice For All' } @albums;
18is $result->year, 1988, 'And Justice For All was released in 1988';
19my %acovers = $result->covers;
20ok $acovers{frontal}, 'And Justice For All has a front cover';
This page took 0.010468 seconds and 4 git commands to generate.