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