Sha256: d265e18656be3037ec2a770d957a9ef1d17b4b3e9d386c29b25577364907584f

Contents?: true

Size: 917 Bytes

Versions: 18

Compression:

Stored size: 917 Bytes

Contents

require 'spec_helper'
require_relative 'shared_examples'

describe Frodo::Properties::Geography::Point do
  let(:klass) { Frodo::Properties::Geography::Point }
  let(:property_name) { 'Location' }
  let(:srid)  { 4326 }
  let(:coordinates)    { [ 142.1, 64.1 ]}
  let(:property_as_text) { "geography'SRID=4326;Point(142.1 64.1)'" }
  let(:property_as_json) { {
    type: 'Point',
    coordinates: [142.1, 64.1],
    crs: {
      type: 'name',
      properties: { name: 'EPSG:4326' }
    }
  } }
  let(:property_as_xml) { <<-END }
    <data:Location metadata:type="Edm.GeographyPoint">
      <gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
        <gml:pos>142.1 64.1</gml:pos>
      </gml:Point>
    </data:Location>
  END
  let(:new_value) { [ 100.0, 0.0 ] }
  let(:new_value_as_text) { "geography'SRID=0;Point(100.0 0.0)'" }

  it_behaves_like 'a geographic property', 'Edm.GeographyPoint'
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
frodo-0.12.8 spec/frodo/properties/geography/point_spec.rb
frodo-0.12.7 spec/frodo/properties/geography/point_spec.rb
frodo-0.12.6 spec/frodo/properties/geography/point_spec.rb
frodo-0.12.5 spec/frodo/properties/geography/point_spec.rb
frodo-0.12.4 spec/frodo/properties/geography/point_spec.rb
frodo-0.12.2 spec/frodo/properties/geography/point_spec.rb
frodo-0.12.1 spec/frodo/properties/geography/point_spec.rb
frodo-0.12.0 spec/frodo/properties/geography/point_spec.rb
frodo-0.11.0 spec/frodo/properties/geography/point_spec.rb
frodo-0.10.8 spec/frodo/properties/geography/point_spec.rb
frodo-0.10.7 spec/frodo/properties/geography/point_spec.rb
frodo-0.10.6 spec/frodo/properties/geography/point_spec.rb
frodo-0.10.5 spec/frodo/properties/geography/point_spec.rb
frodo-0.10.4 spec/frodo/properties/geography/point_spec.rb
frodo-0.10.3 spec/frodo/properties/geography/point_spec.rb
frodo-0.10.2 spec/frodo/properties/geography/point_spec.rb
frodo-0.10.1 spec/frodo/properties/geography/point_spec.rb
frodo-0.10.0 spec/frodo/properties/geography/point_spec.rb