Sha256: 26907ff6726ac3b40b3591a34bfdb7fdf110b23400ad23b1bb28cdd989f9ebe0

Contents?: true

Size: 545 Bytes

Versions: 7

Compression:

Stored size: 545 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"
  it_behaves_like "a potentially publishable object"

  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

7 entries across 7 versions & 1 rubygems

Version Path
ddr-models-3.0.0.beta.17 spec/models/component_spec.rb
ddr-models-3.0.0.beta.16 spec/models/component_spec.rb
ddr-models-3.0.0.beta.15 spec/models/component_spec.rb
ddr-models-3.0.0.beta.14 spec/models/component_spec.rb
ddr-models-3.0.0.beta.13 spec/models/component_spec.rb
ddr-models-3.0.0.beta.12 spec/models/component_spec.rb
ddr-models-3.0.0.beta.11 spec/models/component_spec.rb