Sha256: 4009a4805ed9e45a34616d71fd39e3cf27b98cdb80d6fe286f7da2057bd56db9

Contents?: true

Size: 920 Bytes

Versions: 10

Compression:

Stored size: 920 Bytes

Contents

require 'spec_helper'

describe Geoblacklight::ShapefileDownload 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::ShapefileDownload.new(document) }
  describe '#initialize' do
    it 'should initialize as a ShapefileDownload object with specific options' do
      expect(download).to be_an Geoblacklight::ShapefileDownload
      options = download.instance_variable_get(:@options)
      expect(options[:content_type]).to eq 'application/zip'
      expect(options[:request_params][:typeName]).to eq 'stanford-test'
    end
    it 'should merge custom options' do
      download = Geoblacklight::ShapefileDownload.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/shapefile_download_spec.rb
geoblacklight-0.11.0 spec/lib/geoblacklight/download/shapefile_download_spec.rb
geoblacklight-0.10.2 spec/lib/geoblacklight/download/shapefile_download_spec.rb
geoblacklight-0.10.1 spec/lib/geoblacklight/download/shapefile_download_spec.rb
geoblacklight-0.10.0 spec/lib/geoblacklight/download/shapefile_download_spec.rb
geoblacklight-0.9.2 spec/lib/geoblacklight/download/shapefile_download_spec.rb
geoblacklight-0.9.1 spec/lib/geoblacklight/download/shapefile_download_spec.rb
geoblacklight-0.9.0 spec/lib/geoblacklight/download/shapefile_download_spec.rb
geoblacklight-0.8.0 spec/lib/geoblacklight/download/shapefile_download_spec.rb
geoblacklight-0.7.1 spec/lib/geoblacklight/download/shapefile_download_spec.rb