Sha256: d10b501d32ff0673790dd157be00310d7c450d59b35e8ed6d5165249b65abad8

Contents?: true

Size: 861 Bytes

Versions: 10

Compression:

Stored size: 861 Bytes

Contents

require 'spec_helper'

describe Geoblacklight::HglDownload do
  let(:document) { SolrDocument.new(layer_slug_s: 'test', layer_id_s: 'cite:harvard-test') }
  let(:download) { Geoblacklight::HglDownload.new(document, 'foo@example.com') }
  describe '#initialize' do
    it 'should initialize as an HglDownload object with specific options' do
      expect(download).to be_an Geoblacklight::HglDownload
      options = download.instance_variable_get(:@options)
      expect(options[:request_params]['LayerName']).to eq 'harvard-test'
      expect(options[:request_params]['UserEmail']).to eq 'foo@example.com'
    end
    it 'should merge custom options' do
      download = Geoblacklight::HglDownload.new(document, 'foo@example.com', 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/hgl_download_spec.rb
geoblacklight-0.11.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.10.2 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.10.1 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.10.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.9.2 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.9.1 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.9.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.8.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.7.1 spec/lib/geoblacklight/download/hgl_download_spec.rb