Sha256: 8831780b97409c4e63169128769bc50076924957b6fdbfb345bcb9b2e637706b

Contents?: true

Size: 614 Bytes

Versions: 22

Compression:

Stored size: 614 Bytes

Contents

RSpec.shared_examples "a licensable object" do
  let(:object) { described_class.new }
  before do
    object.license_title = "License Title"
    object.license_description = "License Description"
    object.license_url = "http://library.duke.edu"
  end
  describe "indexing" do
    it "should index the license terms" do
      expect(object.to_solr[Ddr::IndexFields::LICENSE_TITLE]).to eq("License Title")
      expect(object.to_solr[Ddr::IndexFields::LICENSE_DESCRIPTION]).to eq("License Description")
      expect(object.to_solr[Ddr::IndexFields::LICENSE_URL]).to eq("http://library.duke.edu")
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
ddr-models-1.14.1 spec/support/shared_examples_for_licensable.rb
ddr-models-1.14.0 spec/support/shared_examples_for_licensable.rb