Sha256: 2b562598af5701a60504ea5fb2a19e87d61de2ef93f78d60dcc4f61f1c74515b

Contents?: true

Size: 620 Bytes

Versions: 8

Compression:

Stored size: 620 Bytes

Contents

require 'spec_helper'

describe Spotlight::SolrDocumentSidecar, type: :model do
  let(:exhibit) { FactoryGirl.create(:exhibit) }
  before do
    allow(subject).to receive_messages exhibit: exhibit
    allow(subject).to receive_messages document: SolrDocument.new(id: 'doc_id')
  end

  describe '#to_solr' do
    before do
      subject.data = { 'a_tesim' => 1, 'b_tesim' => 2, 'c_tesim' => 3 }
    end

    its(:to_solr) { should include id: 'doc_id' }
    its(:to_solr) { should include "exhibit_#{exhibit.id}_public_bsi".to_sym => true }
    its(:to_solr) { should include 'a_tesim', 'b_tesim', 'c_tesim' }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
blacklight-spotlight-0.8.2 spec/models/spotlight/solr_document_sidecar_spec.rb
blacklight-spotlight-0.8.1 spec/models/spotlight/solr_document_sidecar_spec.rb
blacklight-spotlight-0.8.0 spec/models/spotlight/solr_document_sidecar_spec.rb
blacklight-spotlight-0.7.2 spec/models/spotlight/solr_document_sidecar_spec.rb
blacklight-spotlight-0.7.1 spec/models/spotlight/solr_document_sidecar_spec.rb
blacklight-spotlight-0.7.0 spec/models/spotlight/solr_document_sidecar_spec.rb
blacklight-spotlight-0.6.0 spec/models/spotlight/solr_document_sidecar_spec.rb
blacklight-spotlight-0.5.0 spec/models/spotlight/solr_document_sidecar_spec.rb