Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.0 stable #388

Merged
merged 10 commits into from
Dec 5, 2023
4 changes: 2 additions & 2 deletions test/cases/basic_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_set_point_wkt_wrong_type
def test_default_value
create_model
obj = SpatialModel.create
assert_equal factory.point(0, 0).to_s, obj.default_latlon.to_s
assert_equal factory(srid: 0).point(0, 0), obj.default_latlon
end

def test_custom_factory
Expand All @@ -122,7 +122,7 @@ def test_custom_factory
object.area = area
object.save!
object.reload
assert_equal area.to_s, object.area.to_s
assert_equal area, object.area
end

def test_spatial_factory_attrs_parsing
Expand Down
4 changes: 2 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def postgis_version
@postgis_version ||= SpatialModel.connection.select_value("SELECT postgis_lib_version()")
end

def factory
RGeo::Cartesian.preferred_factory(srid: 3785)
def factory(srid: 3785)
RGeo::Cartesian.preferred_factory(srid: srid)
end

def geographic_factory
Expand Down