Sha256: 83a126142cb3edc13111909132b5dd82e50e10f917d5b92ecc64fe86b0cbb83e

Contents?: true

Size: 911 Bytes

Versions: 10

Compression:

Stored size: 911 Bytes

Contents

require 'spec_helper'

describe Geoblacklight::GeojsonDownload do
  let(:document) { SolrDocument.new(layer_slug_s: 'test', solr_wfs_url: 'http://www.example.com/wfs', layer_id_s: 'stanford-test', solr_geom: 'ENVELOPE(-180, 180, 90, -90)') }
  let(:download) { Geoblacklight::GeojsonDownload.new(document) }
  describe '#initialize' do
    it 'should initialize as a GeojsonDownload object with specific options' do
      expect(download).to be_an Geoblacklight::GeojsonDownload
      options = download.instance_variable_get(:@options)
      expect(options[:content_type]).to eq 'application/json'
      expect(options[:request_params][:typeName]).to eq 'stanford-test'
    end
    it 'should merge custom options' do
      download = Geoblacklight::GeojsonDownload.new(document, timeout: 33)
      options = download.instance_variable_get(:@options)
      expect(options[:timeout]).to eq 33
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
geoblacklight-0.11.1 spec/lib/geoblacklight/download/geojson_download_spec.rb
geoblacklight-0.11.0 spec/lib/geoblacklight/download/geojson_download_spec.rb
geoblacklight-0.10.2 spec/lib/geoblacklight/download/geojson_download_spec.rb
geoblacklight-0.10.1 spec/lib/geoblacklight/download/geojson_download_spec.rb
geoblacklight-0.10.0 spec/lib/geoblacklight/download/geojson_download_spec.rb
geoblacklight-0.9.2 spec/lib/geoblacklight/download/geojson_download_spec.rb
geoblacklight-0.9.1 spec/lib/geoblacklight/download/geojson_download_spec.rb
geoblacklight-0.9.0 spec/lib/geoblacklight/download/geojson_download_spec.rb
geoblacklight-0.8.0 spec/lib/geoblacklight/download/geojson_download_spec.rb
geoblacklight-0.7.1 spec/lib/geoblacklight/download/geojson_download_spec.rb