Sha256: e33e0f5aa42644d748035c7a78693137fac4b9b2039c3ebb6311e7d72fa1e5f1

Contents?: true

Size: 637 Bytes

Versions: 19

Compression:

Stored size: 637 Bytes

Contents

# frozen_string_literal: true

RSpec.describe SolrDocument do
  describe "access methods" do
    let(:solrdoc) do
      SolrDocument.new(id: '00282214', format: ['Book'], title_display: 'some-title')
    end

    describe "#[]" do
      subject { solrdoc[field] }

      context "with title_display" do
        let(:field) { :title_display }
        it { is_expected.to eq 'some-title' }
      end
      context "with format" do
        let(:field) { :format }
        it { is_expected.to eq ['Book'] }
      end
    end
    
    describe "#id" do
      subject { solrdoc.id }
      it { is_expected.to eq '00282214' }
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
blacklight-6.21.0 spec/models/solr_document_spec.rb
blacklight-6.20.0 spec/models/solr_document_spec.rb
blacklight-6.19.2 spec/models/solr_document_spec.rb
blacklight-6.19.1 spec/models/solr_document_spec.rb
blacklight-6.19.0 spec/models/solr_document_spec.rb
blacklight-6.18.0 spec/models/solr_document_spec.rb
blacklight-6.17.0 spec/models/solr_document_spec.rb
blacklight-6.16.0 spec/models/solr_document_spec.rb
blacklight-6.15.0 spec/models/solr_document_spec.rb
blacklight-6.14.1 spec/models/solr_document_spec.rb
blacklight-6.14.0 spec/models/solr_document_spec.rb
blacklight-6.13.0 spec/models/solr_document_spec.rb
blacklight-6.12.0 spec/models/solr_document_spec.rb
blacklight-6.11.2 spec/models/solr_document_spec.rb
blacklight-6.11.1 spec/models/solr_document_spec.rb
blacklight-6.11.0 spec/models/solr_document_spec.rb
blacklight-6.10.1 spec/models/solr_document_spec.rb
blacklight-6.10.0 spec/models/solr_document_spec.rb
blacklight-6.9.0 spec/models/solr_document_spec.rb