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.2.0 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.1.2 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.1.1 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.1.0 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta10 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta9 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta8 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta7 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta6 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta5 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta4 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta3 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta2 spec/indexers/collection_indexer_spec.rb
curation_concerns-1.0.0.beta1 spec/indexers/collection_indexer_spec.rb
curation_concerns-0.14.0 spec/indexers/collection_indexer_spec.rb
curation_concerns-0.14.0.pre4 spec/indexers/collection_indexer_spec.rb
curation_concerns-0.14.0.pre3 spec/indexers/collection_indexer_spec.rb
curation_concerns-0.14.0.pre2 spec/indexers/collection_indexer_spec.rb
curation_concerns-0.14.0.pre1 spec/indexers/collection_indexer_spec.rb