summaryrefslogtreecommitdiff
path: root/t/01-lookup.t
blob: 6a3fb156783d6f89e0f1cb1c172f463ec0071fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!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);