From 46a839e7f7bd688fe2b35a3ca1c41f86f7a6d978 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 17 Feb 2021 19:03:45 +0100 Subject: [PATCH] Remove a spec that was testing bug in libgeos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit we don’t use libgeos anymore --- spec/factories/geo_area.rb | 45 ------------------------------------ spec/models/geo_area_spec.rb | 6 ----- 2 files changed, 51 deletions(-) diff --git a/spec/factories/geo_area.rb b/spec/factories/geo_area.rb index 699d5bca2..772ee91ac 100644 --- a/spec/factories/geo_area.rb +++ b/spec/factories/geo_area.rb @@ -77,51 +77,6 @@ FactoryBot.define do end end - trait :invalid_multi_polygon do - geometry do - { - "type": "MultiPolygon", - "coordinates": [ - [ - [ - [5.894422531127931, 48.22810341752755], - [5.893049240112306, 48.22427237832278], - [5.892534255981446, 48.22593062452037], - [5.892791748046875, 48.2260449843468], - [5.894422531127931, 48.229933066408215], - [5.894422531127931, 48.22810341752755] - ] - ], - [ - [ - [5.8950233459472665, 48.229933066408215], - [5.893478393554688, 48.228961073585126], - [5.892791748046875, 48.228903896961775], - [5.892705917358398, 48.230390468407535], - [5.8950233459472665, 48.229933066408215] - ] - ], - [ - [ - [5.893220901489259, 48.229246955743626], - [5.893392562866212, 48.22884672027457], - [5.892705917358398, 48.22878954352343], - [5.892019271850587, 48.22856083588024], - [5.892019271850587, 48.2277031731152], - [5.890989303588868, 48.22787470681807], - [5.889959335327149, 48.22787470681807], - [5.890560150146485, 48.22838930447709], - [5.890645980834962, 48.22878954352343], - [5.890989303588868, 48.229018250144584], - [5.892362594604493, 48.22930413198368], - [5.893220901489259, 48.229246955743626] - ] - ] - ] - } - end - end - trait :line_string do geometry do { diff --git a/spec/models/geo_area_spec.rb b/spec/models/geo_area_spec.rb index e4c0e0179..700403643 100644 --- a/spec/models/geo_area_spec.rb +++ b/spec/models/geo_area_spec.rb @@ -45,12 +45,6 @@ RSpec.describe GeoArea, type: :model do it { expect(geo_area.geometry).to eq(polygon) } - context 'invalid' do - let(:geo_area) { build(:geo_area, :invalid_multi_polygon) } - - it { expect(geo_area.rgeo_geometry).to be_nil } - end - context 'polygon_with_extra_coordinate' do let(:geo_area) { build(:geo_area, :polygon_with_extra_coordinate) }