summaryrefslogtreecommitdiff
path: root/t/01-lookup.t
blob: 212ec4a49ed871e2a3ba31352a525ad1aa5a34ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!perl -T

use Test::More tests => 2;
use Data::Dumper;
use Geo::USCensus::Geocoding;

diag( "Testing lookup of a known good address" );
my $result = Geo::USCensus::Geocoding->query(
  street  => '1400 J St', # the Sacramento Convention Center
  city    => 'Sacramento',
  state   => 'CA',
  zip     => '95814',
);

ok( $result->is_match );
is( $result->error_message, '', 'error status' );
diag($result->address);
diag('Census tract '.$result->censustract);
diag('Latitude '.$result->latitude.', Longitude '.$result->longitude);