From 854520f7fbd4ad4240ef1718e054db1e5ba72810 Mon Sep 17 00:00:00 2001 From: Vladislav Syabruk Date: Tue, 16 Jan 2024 18:13:26 +0300 Subject: [PATCH] Replace lng with lon --- spec/query/request/filter_spec.rb | 4 ++-- spec/spatial_point_spec.rb | 2 +- spec/spatial_rectangle_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/query/request/filter_spec.rb b/spec/query/request/filter_spec.rb index f3910c3..77084d0 100644 --- a/spec/query/request/filter_spec.rb +++ b/spec/query/request/filter_spec.rb @@ -26,8 +26,8 @@ end context 'when value is spatial rectangle' do - let(:upper_right) { Solr::SpatialPoint.new(lat: 1.0, lng: 2.0) } - let(:lower_left) { Solr::SpatialPoint.new(lat: 3.0, lng: 4.0) } + let(:upper_right) { Solr::SpatialPoint.new(lat: 1.0, lon: 2.0) } + let(:lower_left) { Solr::SpatialPoint.new(lat: 3.0, lon: 4.0) } let(:spatial_rectangle) { Solr::SpatialRectangle.new(upper_right: upper_right, lower_left: lower_left) } subject { described_class.new(type: :equal, field: :field, value: spatial_rectangle).to_solr_s } diff --git a/spec/spatial_point_spec.rb b/spec/spatial_point_spec.rb index 165daca..107b6e9 100644 --- a/spec/spatial_point_spec.rb +++ b/spec/spatial_point_spec.rb @@ -1,7 +1,7 @@ RSpec.describe Solr::SpatialPoint do describe '#to_solr_s' do it 'returns a solr string' do - expect(described_class.new(lat: 1.0, lng: 2.0).to_solr_s).to eq('1.0,2.0') + expect(described_class.new(lat: 1.0, lon: 2.0).to_solr_s).to eq('1.0,2.0') end end end diff --git a/spec/spatial_rectangle_spec.rb b/spec/spatial_rectangle_spec.rb index 8c5ca17..cce3361 100644 --- a/spec/spatial_rectangle_spec.rb +++ b/spec/spatial_rectangle_spec.rb @@ -2,8 +2,8 @@ describe '#to_solr_s' do it 'returns a solr string' do expect(described_class.new( - upper_right: Solr::SpatialPoint.new(lat: 1.0, lng: 2.0), - lower_left: Solr::SpatialPoint.new(lat: 3.0, lng: 4.0) + upper_right: Solr::SpatialPoint.new(lat: 1.0, lon: 2.0), + lower_left: Solr::SpatialPoint.new(lat: 3.0, lon: 4.0) ).to_solr_s).to eq('[3.0,4.0 TO 1.0,2.0]') end end