zeroclickinfo-goodies/t/PaleoIngredientCheck.t

60 lines
1.5 KiB
Perl
Raw Normal View History

2015-08-28 13:42:46 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Test::Deep;
2015-08-28 13:42:46 -07:00
use DDG::Test::Goodie;
zci answer_type => "paleo_ingredient_check";
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::PaleoIngredientCheck )],
2015-10-30 15:00:25 -07:00
'are apples paleo friendly' => test_zci(
'Yes',
structured_answer => {
input => ['apples'],
operation => 'Paleo Friendly',
result => 'Yes',
},
),
'Is dairy allowed on the paleo diet?' => test_zci(
'No',
structured_answer => {
input => ['dairy'],
operation => 'Paleo Friendly',
result => 'No',
},
),
'Is sugar paleo friendly?' => test_zci(
'No',
structured_answer => {
input => ['sugar'],
operation => 'Paleo Friendly',
result => 'No',
},
),
'beans paleo safe' => test_zci(
'No',
structured_answer => {
input => ['beans'],
operation => 'Paleo Friendly',
result => 'No',
},
),
'is sugar paleo' => test_zci(
'No',
structured_answer => {
input => ['sugar'],
operation => 'Paleo Friendly',
result => 'No',
},
),
2015-08-28 13:42:46 -07:00
'Is foobar allowed on the paleo diet?' => undef,
'are notarealfood paleo friendly' => undef,
'paleo diet recipes' => undef,
'paleo recipes' => undef,
);
done_testing;