Sha256: 091319167e2ebdb943b8815a12fbc7441a062eec37acef7f735c3c27d661c1f3
Contents?: true
Size: 1.03 KB
Versions: 8
Compression:
Stored size: 1.03 KB
Contents
require 'spec_helper' describe Sufia::CollectionPresenter do describe ".terms" do subject { described_class.terms } it { is_expected.to eq [:title, :total_items, :size, :resource_type, :description, :creator, :contributor, :tag, :rights, :publisher, :date_created, :subject, :language, :identifier, :based_near, :related_url] } end let(:collection) { Collection.new(id: 'my-nice-collection', description: 'a nice collection', title: 'A clever title') } let(:presenter) { described_class.new(collection) } describe "#terms_with_values" do subject { presenter.terms_with_values } it { is_expected.to eq [:title, :total_items, :size, :description] } end describe "#title" do subject { presenter.title } it { is_expected.to eq 'A clever title' } end describe "#size" do subject { presenter.size } it { is_expected.to eq '0 Bytes' } end describe "#total_items" do subject { presenter.total_items } it { is_expected.to eq 0 } end end
Version data entries
8 entries across 8 versions & 1 rubygems