Sha256: 071cf3c91c2878b15de6b5cdd0c0865141496300c3421b33595b46bd915a311e

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

require 'spec_helper'

describe Hydra::PCDM::PCDMIndexer do
  let(:collection) { Hydra::PCDM::Collection.new }
  let(:member_ids) { %w(123 456 789) }
  let(:indexer) { described_class.new(collection) }

  before do
    allow(collection).to receive(:member_ids).and_return(member_ids)
  end

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hydra-pcdm-0.9.0 spec/hydra/pcdm/pcdm_indexer_spec.rb