dawarich/spec/factories/places.rb

44 lines
1.1 KiB
Ruby
Raw Normal View History

2024-08-12 16:18:11 -04:00
# frozen_string_literal: true
2024-08-05 15:23:08 -04:00
FactoryBot.define do
factory :place do
2024-08-12 16:18:11 -04:00
name { 'MyString' }
latitude { 54.2905245 }
longitude { 13.0948638 }
2025-03-03 16:39:43 -05:00
lonlat { "POINT(#{longitude} #{latitude})" }
trait :with_geodata do
geodata do
{
"geometry": {
"coordinates": [
13.0948638,
54.2905245
],
"type": 'Point'
},
"type": 'Feature',
"properties": {
"osm_id": 5_762_449_774,
"country": 'Germany',
"city": 'Stralsund',
"countrycode": 'DE',
"postcode": '18439',
"locality": 'Frankensiedlung',
"county": 'Vorpommern-Rügen',
"type": 'house',
"osm_type": 'N',
"osm_key": 'amenity',
"housenumber": '84-85',
"street": 'Greifswalder Chaussee',
"district": 'Franken',
"osm_value": 'restaurant',
"name": 'Braugasthaus Zum Alten Fritz',
"state": 'Mecklenburg-Vorpommern'
}
}
end
end
2024-08-05 15:23:08 -04:00
end
end