Sha256: 049ee8117a0c922185153bde7c3ee845cfa65db8f4c7b139d627c36057e6baa4

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 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 solr_document_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

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-spotlight-0.2.0 spec/models/spotlight/solr_document_sidecar_spec.rb