Sha256: 701d143170d372860d5b6d5f0d98a62b9426bdffb8b8fa37c708bb7a8f744c3b

Contents?: true

Size: 817 Bytes

Versions: 20

Compression:

Stored size: 817 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) { described_class.new(document, 'foo@example.com') }
  describe '#initialize' do
    it 'initializes as an HglDownload object with specific options' do
      expect(download).to be_an described_class
      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 'merges custom options' do
      download = described_class.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

20 entries across 20 versions & 1 rubygems

Version Path
geoblacklight-1.8.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.7.1 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.7.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.6.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.5.1 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.5.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.4.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.3.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.2.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.1.2 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.1.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.0.3 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.0.2 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.0.1 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.0.0 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.0.0.pre3 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.0.0.pre2 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-1.0.0.pre1 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.12.1 spec/lib/geoblacklight/download/hgl_download_spec.rb
geoblacklight-0.12.0 spec/lib/geoblacklight/download/hgl_download_spec.rb