Skip to content

Commit

Permalink
test for 'cache' rather than undef
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed May 15, 2024
1 parent 96aa4d5 commit 3e3bb84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion t/geonames.t
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ GOOGLE: {
ok(ref($location) eq 'HASH');
delta_within($location->{geometry}{location}{lat}, 38.99, 1e-1);
delta_within($location->{geometry}{location}{lng}, -77.02, 1e-1);
is($location->{'geocoder'}, undef, 'Verify subsequent reads are cached');
is($location->{'geocoder'}, 'cache', 'Verify subsequent reads are cached');

$location = $geocoderlist->geocode('Plugh Hospice, Rochester, Earth');
ok(!defined($location));
Expand Down
2 changes: 1 addition & 1 deletion t/google.t
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ GOOGLE: {
ok(ref($location) eq 'HASH');
delta_within($location->{geometry}{location}{lat}, 38.99, 1e-1);
delta_within($location->{geometry}{location}{lng}, -77.02, 1e-1);
is($location->{'geocoder'}, undef, 'Verify subsequent reads are cached');
is($location->{'geocoder'}, 'cache', 'Verify subsequent reads are cached');

# $location = $geocoderlist->geocode('Plugh Hospice, Rochester, Earth');
# ok(!defined($location));
Expand Down
2 changes: 1 addition & 1 deletion t/postcodes.t
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ POSTCODES: {
ok(ref($location) eq 'HASH');
delta_within($location->{geometry}{location}{lat}, 51.33, 1e-2);
delta_within($location->{geometry}{location}{lng}, 1.42, 1e-2);
is($location->{'geocoder'}, undef, 'Verify subsequent reads are cached');
is($location->{'geocoder'}, 'cache', 'Verify subsequent reads are cached');

$location = $geocoderlist->geocode('Plumstead, London, England');
ok(defined($location));
Expand Down

0 comments on commit 3e3bb84

Please sign in to comment.