spec/mongoid/geospatial/helpers/sphere_spec.rb in mongoid-geospatial-5.0.0 vs spec/mongoid/geospatial/helpers/sphere_spec.rb in mongoid-geospatial-5.1.0
- old
+ new
@@ -10,22 +10,20 @@
expect(Alarm.collection.indexes.get(spot: '2dsphere')).not_to be_nil
end
it 'should create correct indexes' do
expect(Alarm.collection.indexes.get(spot: '2dsphere'))
- .to eq('2dsphereIndexVersion' => 2,
- 'key' => { 'spot' => '2dsphere' },
- 'name' => 'spot_2dsphere',
- 'ns' => 'mongoid_geo_test.alarms',
- 'v' => 1)
+ .to include('key' => { 'spot' => '2dsphere' },
+ 'name' => 'spot_2dsphere',
+ 'ns' => 'mongoid_geo_test.alarms')
end
it 'should set spatial fields' do
expect(Alarm.spatial_fields).to eql([:spot])
end
it 'should work fine indexed' do
- far = Alarm.create!(name: 'Far', spot: [7, 7])
+ far = Alarm.create!(name: 'Far', spot: [7, 7])
expect(far.spot).to be_instance_of(Mongoid::Geospatial::Point)
end
end
end