Sha256: 133c9b1be9f5e3c180a3ec78e6cec445f601df29560eabb8335c4d54aa6b34f4
Contents?: true
Size: 815 Bytes
Versions: 30
Compression:
Stored size: 815 Bytes
Contents
require 'spec_helper' RSpec.describe Component, type: :model, components: true do it_behaves_like "a DDR model" it_behaves_like "an object that can have content" it_behaves_like "it has an association", :belongs_to, :parent, :is_part_of, "Item" it_behaves_like "it has an association", :belongs_to, :target, :has_external_target, "Target" describe "indexing" do let(:component) { FactoryGirl.build(:component) } before do allow_any_instance_of(Component).to receive(:collection) { Collection.new(pid: 'test:1') } end it "should include the COLLECTION_URI field in its indexing" do expect(component.index_fields).to have_key(Ddr::IndexFields::COLLECTION_URI) expect(component.index_fields[Ddr::IndexFields::COLLECTION_URI]).to eq('info:fedora/test:1') end end end
Version data entries
30 entries across 30 versions & 1 rubygems