zeroclickinfo-goodies/t/CssColors.t

60 lines
1.5 KiB
Perl
Raw Normal View History

2016-07-16 14:36:26 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Test::Deep;
use DDG::Test::Goodie;
zci answer_type => 'csscolors';
2016-07-16 14:36:26 -07:00
zci is_cached => 1;
sub build_structured_answer {
return 'CSS Colors',
structured_answer => {
# Ignoring data here is good because if there is some new color
# added to the library in future, all the tests will break
2016-07-16 15:12:58 -07:00
data => ignore(),
2016-07-16 14:36:26 -07:00
templates => {
group => 'list',
options => {
2016-07-16 15:19:04 -07:00
list_content => 'DDH.css_colors.content'
2016-07-16 14:36:26 -07:00
}
}
};
}
# Use this to build expected results for your tests.
sub build_test { test_zci(build_structured_answer(@_)) }
ddg_goodie_test(
[qw( DDG::Goodie::CssColors )],
'css colors' => build_test(),
2016-07-16 15:47:53 -07:00
'css3 colors' => build_test(),
'css named colors' => build_test(),
'css3 named colors' => build_test(),
'named css colors' => build_test(),
2016-07-16 15:47:53 -07:00
'named css3 colors' => build_test(),
'named colors css' => build_test(),
'named colors css3' => build_test(),
2016-07-16 15:47:53 -07:00
'css colours' => build_test(),
'css3 colours' => build_test(),
'css named colours' => build_test(),
'css3 named colours' => build_test(),
'named css colours' => build_test(),
2016-07-16 15:47:53 -07:00
'named css3 colours' => build_test(),
'named colours css' => build_test(),
'named colours css3' => build_test(),
2016-07-16 14:36:26 -07:00
'color picker' => undef,
'css tutorial' => undef,
'css forum' => undef,
'colors tv' => undef,
2016-07-16 14:36:26 -07:00
);
done_testing;