Sha256: 0867d999b6abe024a5838f4363127f3eccbef050c8afed2dd3d2adb18ebb24fe

Contents?: true

Size: 492 Bytes

Versions: 13

Compression:

Stored size: 492 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 "a non-collection model"

  describe "indexing" do
    subject { FactoryGirl.build(:component) }
    before do
      allow(subject).to receive(:collection) { Collection.new(id: "test-1") }
    end
    its(:index_fields) { is_expected.to include(Ddr::Index::Fields::COLLECTION_URI => "test-1") }
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ddr-models-3.0.0.beta.10 spec/models/component_spec.rb
ddr-models-3.0.0.beta.9 spec/models/component_spec.rb
ddr-models-3.0.0.beta.8 spec/models/component_spec.rb
ddr-models-3.0.0.beta.7 spec/models/component_spec.rb
ddr-models-3.0.0.beta.6 spec/models/component_spec.rb
ddr-models-3.0.0.beta.4 spec/models/component_spec.rb
ddr-models-3.0.0.beta.3 spec/models/component_spec.rb
ddr-models-3.0.0.beta.2 spec/models/component_spec.rb
ddr-models-3.0.0.beta.1 spec/models/component_spec.rb
ddr-models-3.0.0.alpha.4 spec/models/component_spec.rb
ddr-models-3.0.0.alpha.3 spec/models/component_spec.rb
ddr-models-3.0.0.alpha.2 spec/models/component_spec.rb
ddr-models-3.0.0.alpha.1 spec/models/component_spec.rb