Sha256: 7c09902eef0fb60b0accef2fc368d481ee7e04ea738b8f00b14ba2c8af151d7d

Contents?: true

Size: 978 Bytes

Versions: 10

Compression:

Stored size: 978 Bytes

Contents

require 'spec_helper'

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