Sha256: ad4ee0ac2f30f13631c390acc8b6d16726b1517601b49e065e01a3414b4f55da

Contents?: true

Size: 621 Bytes

Versions: 8

Compression:

Stored size: 621 Bytes

Contents

require 'spec_helper'

describe Hydra::PCDM::ObjectIndexer do
  let(:object)        { Hydra::PCDM::Object.new }
  let(:child_object1) { Hydra::PCDM::Object.new(id: '123') }
  let(:child_object2) { Hydra::PCDM::Object.new(id: '456') }
  let(:indexer)       { described_class.new(object) }

  before do
    allow(object).to receive(:ordered_object_ids).and_return([child_object1.id, child_object2.id])
  end

  describe '#generate_solr_document' do
    subject { indexer.generate_solr_document }

    it 'has fields' do
      expect(subject[Hydra::PCDM::Config.indexing_object_ids_key]).to eq %w(123 456)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hydra-pcdm-0.11.0 spec/hydra/pcdm/object_indexer_spec.rb
hydra-pcdm-0.10.0 spec/hydra/pcdm/object_indexer_spec.rb
hydra-pcdm-0.8.2 spec/hydra/pcdm/object_indexer_spec.rb
hydra-pcdm-0.8.1 spec/hydra/pcdm/object_indexer_spec.rb
hydra-pcdm-0.8.0 spec/hydra/pcdm/object_indexer_spec.rb
hydra-pcdm-0.8.0.beta1 spec/hydra/pcdm/object_indexer_spec.rb
hydra-pcdm-0.7.0 spec/hydra/pcdm/object_indexer_spec.rb
hydra-pcdm-0.6.0 spec/hydra/pcdm/object_indexer_spec.rb