Sha256: 4cb78b78a32ee34b714910b45feb789f4c35822b42ede1dd6c7baaeaed08d6a3
Contents?: true
Size: 771 Bytes
Versions: 34
Compression:
Stored size: 771 Bytes
Contents
require 'spec_helper' describe ActiveFedora::IndexingService do let(:indexer) { described_class.new(object) } let(:object) { ActiveFedora::Base.new } describe "#generate_solr_document" do context "when no block is passed" do subject { indexer.generate_solr_document } it "produces a document" do expect(subject['has_model_ssim']).to eq ['ActiveFedora::Base'] end end context "when a block is passed" do subject do indexer.generate_solr_document do |solr_doc| solr_doc['noid'] = '12345' end end it "produces and yield the document" do expect(subject['has_model_ssim']).to eq ['ActiveFedora::Base'] expect(subject['noid']).to eq '12345' end end end end
Version data entries
34 entries across 34 versions & 1 rubygems