Sha256: 7010f1effe46a3469d1d4792b16ad25140992521eb21d76abbcc54f9d6f69ae0

Contents?: true

Size: 763 Bytes

Versions: 44

Compression:

Stored size: 763 Bytes

Contents

require 'spec_helper'

describe Hydra::AccessControls::LeaseIndexer do
  let(:attrs) do
    {
      visibility_during_lease: Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC,
      visibility_after_lease: Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED,
      lease_expiration_date: Date.parse('2010-10-10')
    }
  end
  let(:lease) { Hydra::AccessControls::Lease.new(attrs) }
  let(:indexer) { described_class.new(lease) }
  subject { indexer.generate_solr_document }

  it "has the fields" do
    expect(subject['visibility_during_lease_ssim']).to eq 'open'
    expect(subject['visibility_after_lease_ssim']).to eq 'authenticated'
    expect(subject['lease_expiration_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/lease_indexer_spec.rb
hydra-access-controls-12.1.0 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-12.0.2 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-11.0.7 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-12.0.1 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-11.0.6 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-12.0.0 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-11.0.1 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-11.0.0 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-11.0.0.rc2 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-10.7.0 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-10.6.2 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-10.6.1 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-10.6.0 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-10.5.1 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-11.0.0.rc1 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-10.5.0 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-10.4.0 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-10.4.0.rc2 spec/indexers/lease_indexer_spec.rb
hydra-access-controls-10.4.0.rc1 spec/indexers/lease_indexer_spec.rb