Sha256: 7748a1bea54a50153a5265b8ca19362d6e999562b0305018f36edd9010b6d7ad

Contents?: true

Size: 711 Bytes

Versions: 54

Compression:

Stored size: 711 Bytes

Contents

require 'spec_helper'

describe CurationConcerns::CollectionIndexer do
  let(:indexer) { described_class.new(collection) }
  let(:collection) { build(:collection) }

  describe "#generate_solr_document" do
    before do
      allow(collection).to receive(:bytes).and_return(1000)
      allow(CurationConcerns::ThumbnailPathService).to receive(:call).and_return("/downloads/1234?file=thumbnail")
    end
    subject { indexer.generate_solr_document }

    it "has required fields" do
      expect(subject.fetch('generic_type_sim')).to eq ["Collection"]
      expect(subject.fetch('bytes_lts')).to eq(1000)
      expect(subject.fetch('thumbnail_path_ss')).to eq "/downloads/1234?file=thumbnail"
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.7.7 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.7.6 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.7.5 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.7.4 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.7.3 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.7.2 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.7.1 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.7.0 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.7.0.beta1 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.6.3 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.6.2 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.6.1 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.6.0 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.5.0 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.4.0 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.3.3 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.3.2 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.3.1 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.3.0 spec/indexers/collection_indexer_spec.rb