Sha256: fd4933ff6f4fd0f6b7a75b1d5a04e0237d25cbbefbcd5c74eac5eb7d2d86ae06

Contents?: true

Size: 587 Bytes

Versions: 7

Compression:

Stored size: 587 Bytes

Contents

require 'spec_helper'

describe Sufia::PresenterRenderer, type: :view do
  let(:generic_file) { GenericFile.new }
  let(:presenter) { Sufia::GenericFilePresenter.new(generic_file) }
  let(:renderer) { Sufia::PresenterRenderer.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

7 entries across 7 versions & 1 rubygems

Version Path
sufia-6.2.0 spec/presenters/presenter_renderer_spec.rb
sufia-6.1.0 spec/presenters/presenter_renderer_spec.rb
sufia-6.0.0 spec/presenters/presenter_renderer_spec.rb
sufia-6.0.0.rc4 spec/presenters/presenter_renderer_spec.rb
sufia-6.0.0.rc3 spec/presenters/presenter_renderer_spec.rb
sufia-6.0.0.rc2 spec/presenters/presenter_renderer_spec.rb
sufia-6.0.0.rc1 spec/presenters/presenter_renderer_spec.rb