Skip to content
Snippets Groups Projects
Commit fd09201e authored by Thu Trang Pham's avatar Thu Trang Pham
Browse files

Fixing NearTest

parent e71c1e85
Branches
Tags
No related merge requests found
......@@ -6,7 +6,8 @@ class NearTest < GeocoderTestCase
def test_near_scope_options_without_sqlite_includes_bounding_box_condition
result = PlaceWithCustomResultsHandling.send(:near_scope_options, 1.0, 2.0, 5)
assert_match(/test_table_name.latitude BETWEEN 0.9276\d* AND 1.0723\d* AND test_table_name.longitude BETWEEN 1.9276\d* AND 2.0723\d* AND /, result[:conditions][0])
table_name = PlaceWithCustomResultsHandling.table_name
assert_match(/#{table_name}.latitude BETWEEN 0.9276\d* AND 1.0723\d* AND #{table_name}.longitude BETWEEN 1.9276\d* AND 2.0723\d* AND /, result[:conditions][0])
end
def test_near_scope_options_without_sqlite_includes_radius_condition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment