Sha256: 252934c11f2f36a31017f01afb6a1ce830f6ec4ae2b7f639171083d64172febf

Contents?: true

Size: 628 Bytes

Versions: 16

Compression:

Stored size: 628 Bytes

Contents

describe Sufia::PresenterRenderer, type: :view do
  let(:work) { GenericWork.new }
  let(:ability) { double }
  let(:document) { SolrDocument.new(work.to_solr) }
  let(:presenter) { Sufia::WorkShowPresenter.new(document, ability) }
  let(:renderer) { described_class.new(presenter, view) }

  describe "#label" do
    context "of a field with a translation" do
      subject { renderer.label(:date_created) }
      it { is_expected.to eq 'Date Created' }
    end

    context "of a field without a translation" do
      subject { renderer.label(:date_uploaded) }
      it { is_expected.to eq 'Date uploaded' }
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sufia-7.4.1 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.4.0 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.3.1 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.3.0 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.3.0.rc3 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.3.0.rc2 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.3.0.rc1 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.2.0 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.1.0 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.0.0 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.0.0.rc2 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.0.0.rc1 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.0.0.beta4 spec/presenters/sufia/presenter_renderer_spec.rb
sufia-7.0.0.beta3 spec/presenters/presenter_renderer_spec.rb
sufia-7.0.0.beta2 spec/presenters/presenter_renderer_spec.rb
sufia-7.0.0.beta1 spec/presenters/presenter_renderer_spec.rb