From 792fa56fe32dfea38ab824183dc130bc926480df Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 11 Sep 2014 15:54:45 -0700 Subject: Import original source of Geo-USCensus-Geocoding 0.01 --- t/01-lookup.t | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 t/01-lookup.t (limited to 't/01-lookup.t') diff --git a/t/01-lookup.t b/t/01-lookup.t new file mode 100644 index 0000000..11c8b37 --- /dev/null +++ b/t/01-lookup.t @@ -0,0 +1,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 => '1526 H St', # the California Governor's Mansion + city => 'Sacramento', + state => 'CA', + zip => '95814', +); + +is( $result->message, '', 'error status' ); +is( $result->matches, 1, 'number of matches' ); +diag($result->match(0)->matchedAddress); +diag('Census tract '.$result->match(0)->censustract); + -- cgit v1.2.1