Skip to content
Snippets Groups Projects
Commit 5ff7d0c0 authored by Joe Marty's avatar Joe Marty Committed by mltsy
Browse files

add test for geocoded? edge case

Test that geocoded? returns false when only a single coordinate is present
parent f8422ca1
Branches
Tags
No related merge requests found
......@@ -8,6 +8,12 @@ class MongoidTest < GeocoderTestCase
assert p.geocoded?
end
def test_geocoded_check_single_coord
p = PlaceUsingMongoid.new(*geocoded_object_params(:msg))
p.location = [40.750354, nil]
assert !p.geocoded?
end
def test_distance_to_returns_float
p = PlaceUsingMongoid.new(*geocoded_object_params(:msg))
p.location = [40.750354, -73.993371]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment