Sha256: b5bd2842762796d9df66b20e92a5b3f53402a3d01b8c55bda2c17ae74b2805cb

Contents?: true

Size: 1.28 KB

Versions: 66

Compression:

Stored size: 1.28 KB

Contents

require 'spec_helper'

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

  describe "visibility" do
    subject { presenter.visibility }

    it { is_expected.to eq 'restricted' }
  end

  describe "to_s" do
    let(:attributes) { { 'title_tesim' => ['Hey guys!'] } }
    subject { presenter.to_s }

    it { is_expected.to eq 'Hey guys!' }
  end

  describe "human_readable_type" do
    let(:attributes) { { 'human_readable_type_tesim' => ['File'] } }
    subject { presenter.human_readable_type }

    it { is_expected.to eq 'File' }
  end

  describe "lease_expiration_date" do
    let(:attributes) { { 'lease_expiration_date_dtsi' => '2015-10-15T00:00:00Z' } }
    subject { presenter.lease_expiration_date }

    it { is_expected.to eq '15 Oct 2015' }
  end

  describe "visibility_after_lease" do
    let(:attributes) { { 'visibility_after_lease_ssim' => ['restricted'] } }
    subject { presenter.visibility_after_lease }

    it { is_expected.to eq 'restricted' }
  end

  describe "lease_history" do
    let(:attributes) { { 'lease_history_ssim' => ['This is in the past'] } }
    subject { presenter.lease_history }

    it { is_expected.to eq ['This is in the past'] }
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
curation_concerns-0.14.0.pre3 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.14.0.pre2 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.14.0.pre1 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.13.1 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.13.0 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0.pre9 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0.pre8 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0.pre7 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0.pre6 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0.pre5 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0.pre4 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0.pre3 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0.pre2 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.12.0.pre1 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.11.0 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.11.0.rc1 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.10.0 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.9.0 spec/presenters/lease_presenter_spec.rb
curation_concerns-0.8.0 spec/presenters/lease_presenter_spec.rb