Sha256: 3531e7108c47e720fe77819cdf530cfb73256732c5aede9e6d9e7cbf0e937a1f

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

describe 'gdor indexing integration test', :vcr do
  let :exhibit do
    double(solr_data: {}, blacklight_config: Blacklight::Configuration.new)
  end

  subject do
    r = Spotlight::Resources::DorHarvester.new(druid_list: 'xf680rd3068')
    allow(r).to receive(:to_global_id).and_return('x')
    allow(r).to receive(:exhibit).and_return(exhibit)
    r.document_builder.to_solr.first
  end

  it 'has a doc id' do
    expect(subject[:id]).to eq 'xf680rd3068'
  end

  it 'has the gdor data' do
    expect(subject).to include :collection, :modsxml, :url_fulltext
  end

  it 'has spotlight data' do
    expect(subject).to include :spotlight_resource_id_ssim
  end

  it 'has exhibit-specific indexing' do
    expect(subject).to include 'full_image_url_ssm'
  end

  it 'can write doc to solr with latest exhibits_solr_conf', vcr: false do
    # hd778hw9236 has B.C. date -- good for checking Solr field types
    r = Spotlight::Resources::DorHarvester.new(druid_list: 'hd778hw9236')
    allow(r).to receive(:to_global_id).and_return('x')
    allow(r).to receive(:exhibit).and_return(exhibit)
    r.reindex
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spotlight-dor-resources-2.0.0 spec/integration/gdor_integration_spec.rb