Sha256: 5f6572641a82d290cf05d5dd5191b9772868d46d4c03849dd2195be8fb1ca069

Contents?: true

Size: 1.1 KB

Versions: 6

Compression:

Stored size: 1.1 KB

Contents

require 'spec_helper'

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.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

6 entries across 6 versions & 1 rubygems

Version Path
spotlight-dor-resources-1.1.0 spec/integration/gdor_integration_spec.rb
spotlight-dor-resources-1.0.1 spec/integration/gdor_integration_spec.rb
spotlight-dor-resources-1.0.0 spec/integration/gdor_integration_spec.rb
spotlight-dor-resources-0.6.2 spec/integration/gdor_integration_spec.rb
spotlight-dor-resources-0.6.1 spec/integration/gdor_integration_spec.rb
spotlight-dor-resources-0.6.0 spec/integration/gdor_integration_spec.rb