Sha256: 8b007bc22ed1ea9d5434dc74f418df9f8b8a8ba2b5c43625136cf98d91448fde
Contents?: true
Size: 860 Bytes
Versions: 13
Compression:
Stored size: 860 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" it_behaves_like "a non-collection model" 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
13 entries across 13 versions & 1 rubygems