Skip to content
Snippets Groups Projects
Commit 82286361 authored by Alex Reisner's avatar Alex Reisner
Browse files

Remove tests for deprecated functionality.

parent c63f7391
No related branches found
No related tags found
No related merge requests found
...@@ -14,13 +14,6 @@ class MongoidTest < GeocoderTestCase ...@@ -14,13 +14,6 @@ class MongoidTest < GeocoderTestCase
assert p.distance_to([30, -94]).is_a?(Float) assert p.distance_to([30, -94]).is_a?(Float)
end end
def test_custom_coordinate_field_near_scope
location = [40.750354, -73.993371]
p = PlaceUsingMongoid.near(location)
key = Mongoid::VERSION >= "3" ? "location" : :location
assert_equal p.selector[key]['$nearSphere'], location.reverse
end
def test_model_configuration def test_model_configuration
p = PlaceUsingMongoid.new(*geocoded_object_params(:msg)) p = PlaceUsingMongoid.new(*geocoded_object_params(:msg))
p.location = [0, 0] p.location = [0, 0]
...@@ -36,11 +29,4 @@ class MongoidTest < GeocoderTestCase ...@@ -36,11 +29,4 @@ class MongoidTest < GeocoderTestCase
result = PlaceUsingMongoidWithoutIndex.index_options.keys.flatten[0] == :coordinates result = PlaceUsingMongoidWithoutIndex.index_options.keys.flatten[0] == :coordinates
assert !result assert !result
end end
def test_nil_radius_omits_max_distance
location = [40.750354, -73.993371]
p = PlaceUsingMongoid.near(location, nil)
key = Mongoid::VERSION >= "3" ? "location" : :location
assert_equal nil, p.selector[key]['$maxDistance']
end
end end
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