zeroclickinfo-goodies/t/WhereAmI.t

35 lines
733 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 => 'where_am_i';
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 => {
id => 'where_am_i',
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,
display=> "Phoenixville, PA, United States"
2016-03-02 03:44:25 -08:00
},
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;