dawarich/spec/factories/points.rb

55 lines
1.3 KiB
Ruby
Raw Normal View History

2024-05-23 14:12:23 -04:00
# frozen_string_literal: true
2024-03-15 18:27:31 -04:00
FactoryBot.define do
factory :point do
battery_status { 1 }
2024-05-23 14:12:23 -04:00
ping { 'MyString' }
2024-03-15 18:27:31 -04:00
battery { 1 }
2024-05-23 14:12:23 -04:00
topic { 'MyString' }
2024-03-15 18:27:31 -04:00
altitude { 1 }
2024-05-23 14:12:23 -04:00
longitude { 'MyString' }
velocity { 'MyString' }
2024-03-15 18:27:31 -04:00
trigger { 1 }
2024-05-23 14:12:23 -04:00
bssid { 'MyString' }
ssid { 'MyString' }
2024-03-15 18:27:31 -04:00
connection { 1 }
vertical_accuracy { 1 }
accuracy { 1 }
timestamp { 1 }
2024-05-23 14:12:23 -04:00
latitude { 'MyString' }
2024-03-15 18:27:31 -04:00
mode { 1 }
2024-05-23 14:12:23 -04:00
inrids { 'MyString' }
in_regions { 'MyString' }
raw_data { '' }
tracker_id { 'MyString' }
import_id { '' }
2024-04-02 17:20:25 -04:00
city { nil }
country { nil }
2024-07-12 15:59:03 -04:00
user
2024-08-20 14:14:17 -04:00
trait :with_geodata do
geodata do
{
'type' => 'Feature',
'geometry' => { 'type' => 'Point', 'coordinates' => [37.6177036, 55.755847] },
'properties' => {
'city' => 'Moscow',
'name' => 'Kilometre zero',
'type' => 'house',
'state' => 'Moscow',
'osm_id' => 583_204_619,
'street' => 'Манежная площадь',
'country' => 'Russia',
'osm_key' => 'tourism',
'district' => 'Tverskoy',
'osm_type' => 'N',
'postcode' => '103265',
'osm_value' => 'attraction',
'countrycode' => 'RU'
}
}
end
end
2024-03-15 18:27:31 -04:00
end
end