Sha256: 12e9171c0b5133ed45b87db702d4b1a7d02319f5f510c9d874d5d7bb8389fb34

Contents?: true

Size: 1 KB

Versions: 3

Compression:

Stored size: 1 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 'Your Institution' }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
geo_concerns-0.0.10 spec/models/solr_document_spec.rb
geo_concerns-0.0.9 spec/models/solr_document_spec.rb
geo_concerns-0.0.8 spec/models/solr_document_spec.rb