2013-03-20 13:14:09 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
|
|
|
zci answer_type => 'fortune';
|
2014-10-14 11:52:56 -07:00
|
|
|
zci is_cached => 0;
|
|
|
|
|
|
|
|
my @fortune = (
|
|
|
|
'-ANY-',
|
|
|
|
structured_answer => {
|
|
|
|
input => [],
|
2015-01-09 00:46:54 -08:00
|
|
|
operation => 'Random fortune',
|
2014-10-14 11:52:56 -07:00
|
|
|
result => '-ANY-'
|
|
|
|
});
|
2013-03-20 13:14:09 -07:00
|
|
|
|
|
|
|
ddg_goodie_test(
|
2014-10-14 11:52:56 -07:00
|
|
|
[qw( DDG::Goodie::Fortune )],
|
|
|
|
'gimmie a fortune cookie' => test_zci(@fortune),
|
|
|
|
'gimmie a unix fortune' => test_zci(@fortune),
|
|
|
|
'give me a fortune cookie' => test_zci(@fortune),
|
|
|
|
'give me a unix fortune' => test_zci(@fortune),
|
|
|
|
'unix fortune cookie' => test_zci(@fortune),
|
|
|
|
'how do I make a fortune overnight' => undef,
|
|
|
|
"bill gates' fortune" => undef,
|
2013-03-20 13:14:09 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|
|
|
|
|