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

Version Path
hydra-access-controls-13.0.0 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-12.1.0 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-12.0.2 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-11.0.7 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-12.0.1 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-11.0.6 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-12.0.0 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-11.0.1 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-11.0.0 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-11.0.0.rc2 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-10.7.0 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-10.6.2 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-10.6.1 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-10.6.0 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-10.5.1 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-11.0.0.rc1 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-10.5.0 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-10.4.0 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-10.4.0.rc2 spec/indexers/embargo_indexer_spec.rb
hydra-access-controls-10.4.0.rc1 spec/indexers/embargo_indexer_spec.rb