Sha256: 1cff818ba676bb0f201e208fa1a0622b1e8700dfa4a72755373d9d7b0d83f972
Contents?: true
Size: 777 Bytes
Versions: 44
Compression:
Stored size: 777 Bytes
Contents
require 'spec_helper' describe Hydra::AccessControls::EmbargoIndexer do let(:attrs) do { visibility_during_embargo: Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED, visibility_after_embargo: Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC, embargo_release_date: Date.parse('2010-10-10') } end let(:embargo) { Hydra::AccessControls::Embargo.new(attrs) } let(:indexer) { described_class.new(embargo) } subject { indexer.generate_solr_document } it "has the fields" do expect(subject['visibility_during_embargo_ssim']).to eq 'authenticated' expect(subject['visibility_after_embargo_ssim']).to eq 'open' expect(subject['embargo_release_date_dtsi']).to eq '2010-10-10T00:00:00Z' end end
Version data entries
44 entries across 44 versions & 1 rubygems