Skip to content

Commit

Permalink
Add :keyword delegate to CurationConcerns::CollectionPresenter
Browse files Browse the repository at this point in the history
  • Loading branch information
bmquinn committed May 17, 2016
1 parent 3682868 commit e13ffd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/presenters/curation_concerns/collection_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(solr_document, current_ability)
:to_s, to: :solr_document

# Metadata Methods
delegate :title, :description, :creator, :contributor, :subject, :publisher, :language,
delegate :title, :description, :creator, :contributor, :subject, :publisher, :keyword, :language,
:embargo_release_date, :lease_expiration_date, :rights, :date_created, to: :solr_document

def size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
id: 'adc12v',
description: ['a nice collection'],
title: ['A clever title'],
keyword: ['neologism'],
date_created: ['some date'])
end
let(:work) { build(:work, title: ['unimaginitive title']) }
Expand All @@ -21,6 +22,11 @@
it { is_expected.to eq ['A clever title'] }
end

describe '#keyword' do
subject { presenter.keyword }
it { is_expected.to eq ['neologism'] }
end

describe '#to_key' do
subject { presenter.to_key }
it { is_expected.to eq ['adc12v'] }
Expand Down

0 comments on commit e13ffd4

Please sign in to comment.