Sha256: cfddc78f329de77e5b850dc5ff1f3c8a8c9e5e98106cc2ce2b664830a6d2bc65
Contents?: true
Size: 884 Bytes
Versions: 12
Compression:
Stored size: 884 Bytes
Contents
# frozen_string_literal: true 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) { described_class.new(document) } describe '#initialize' do it 'initializes as a GeojsonDownload object with specific options' do expect(download).to be_an described_class 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 'merges custom options' do download = described_class.new(document, timeout: 33) options = download.instance_variable_get(:@options) expect(options[:timeout]).to eq 33 end end end
Version data entries
12 entries across 12 versions & 1 rubygems