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
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,12 @@ class MongoidTest < GeocoderTestCase ...@@ -8,6 +8,12 @@ class MongoidTest < GeocoderTestCase
assert p.geocoded? assert p.geocoded?
end 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 def test_distance_to_returns_float
p = PlaceUsingMongoid.new(*geocoded_object_params(:msg)) p = PlaceUsingMongoid.new(*geocoded_object_params(:msg))
p.location = [40.750354, -73.993371] p.location = [40.750354, -73.993371]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment