Sha256: 2dedb9214908b40f5e3cc946034033dcd5d8320a54d3d2b01c08b901a61f3cb4

Contents?: true

Size: 1.19 KB

Versions: 6

Compression:

Stored size: 1.19 KB

Contents

require 'spec_helper'

describe SolrDocument do
  let(:document) { described_class.new(attributes) }

  describe "spatial" do
    let(:attributes) { { Solrizer.solr_name('spatial') => ['one', 'two'] } }
    subject { document.spatial }
    it { is_expected.to match_array ['one', 'two'] }
  end

  describe "temporal" do
    let(:attributes) { { Solrizer.solr_name('temporal') => ['one', 'two'] } }
    subject { document.temporal }
    it { is_expected.to match_array ['one', 'two'] }
  end

  describe "issued" do
    let(:attributes) { { Solrizer.solr_name('issued') => 'one' } }
    subject { document.issued }
    it { is_expected.to eq 'one' }
  end

  describe "coverage" do
    let(:attributes) { { Solrizer.solr_name('coverage') => 'one' } }
    subject { document.coverage }
    it { is_expected.to eq 'one' }
  end

  describe "provenance" do
    let(:attributes) { { Solrizer.solr_name('provenance') => ['unused'] } }
    subject { document.provenance }
    it { is_expected.to eq 'Institution' }
  end

  describe "identifier" do
    let(:attributes) { { Solrizer.solr_name('identifier') => ['identifier'] } }
    subject { document.identifier }
    it { is_expected.to match_array ['identifier'] }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 spec/models/solr_document_spec.rb
geo_works-0.1.4 spec/models/solr_document_spec.rb
geo_works-0.1.3 spec/models/solr_document_spec.rb
geo_works-0.1.2 spec/models/solr_document_spec.rb
geo_works-0.1.1 spec/models/solr_document_spec.rb
geo_works-0.1.0 spec/models/solr_document_spec.rb