zeroclickinfo-goodies/t/ChordDiagrams.t

58 lines
1.0 KiB
Perl
Raw Normal View History

2016-03-28 18:04:53 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'chord_diagrams';
zci is_cached => 1;
ddg_goodie_test(
2016-03-29 17:17:20 -07:00
[ 'DDG::Goodie::ChordDiagrams' ],
'Amaj9 guitar chord' => test_zci(
'chord_diagrams',
structured_answer => {
id => 'chord_diagrams',
name => 'Music',
data => qr/.*/,
templates => {
2016-03-31 17:11:56 -07:00
group => "base",
2016-03-29 17:17:20 -07:00
detail => 0,
options => {
content => 'DDH.chord_diagrams.detail'
},
variants => {
tile => 'narrow'
}
},
}),
'Cm ukulele chord' => test_zci(
'chord_diagrams',
structured_answer => {
id => 'chord_diagrams',
name => 'Music',
data => qr/.*/,
templates => {
2016-03-31 17:11:56 -07:00
group => "base",
2016-03-29 17:17:20 -07:00
detail => 0,
options => {
content => 'DDH.chord_diagrams.detail'
},
variants => {
tile => 'narrow'
}
},
}),
# check that certain things don't trigger it:
'C# programming' => undef,
'C programming' => undef,
'D programming' => undef,
'guitar chord finder' => undef,
'guitar chord fminute' => undef,
'G' => undef
);
2016-03-28 18:04:53 -07:00
2016-03-29 17:17:20 -07:00
done_testing;