zeroclickinfo-goodies/t/WhereAmI.t

34 lines
672 B
Perl
Raw Normal View History

2014-01-30 08:26:29 -08:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'whereami';
2014-10-06 02:34:48 -07:00
zci is_cached => 0;
my @test_loc = (
2016-03-11 07:58:00 -08:00
'',
2014-10-06 02:34:48 -07:00
structured_answer => {
2016-03-02 03:44:25 -08:00
id => 'whereami',
2016-03-11 07:58:00 -08:00
name => 'Answer',
2016-03-02 03:44:25 -08:00
data => {
lat => 40.1246,
lon => -75.5385
},
templates => {
group => 'places'
}
2014-10-06 02:34:48 -07:00
});
2014-01-30 08:26:29 -08:00
ddg_goodie_test(
2014-10-06 02:34:48 -07:00
[qw(DDG::Goodie::WhereAmI)],
2016-03-02 03:44:25 -08:00
'where am I' => test_zci(@test_loc),
2014-10-06 02:34:48 -07:00
'where am I?' => test_zci(@test_loc),
'my location' => test_zci(@test_loc),
'my location is nowhere!' => undef,
2014-01-30 08:26:29 -08:00
);
done_testing;