Sha256: a9633cf925fca375a3cdc0318cdeec1db3690dc253f4438d53d44150ef285bcc
Contents?: true
Size: 948 Bytes
Versions: 9
Compression:
Stored size: 948 Bytes
Contents
describe 'spotlight/browse/search', type: :view do let(:search) { FactoryGirl.create(:search) } let(:exhibit) { FactoryGirl.create(:exhibit) } before do allow(search).to receive_messages(documents: double(size: 15)) allow(search).to receive_message_chain(:thumbnail, iiif_url: '/some/image') end before do assign :exhibit, exhibit end it 'displays the image' do render partial: 'spotlight/browse/search', locals: { search: search } expect(response).to have_selector 'a img[src="/some/image"]' end it 'has a heading' do render partial: 'spotlight/browse/search', locals: { search: search } expect(response).to have_link search.title, href: spotlight.exhibit_browse_path(exhibit, search) end it 'displays the item count' do render partial: 'spotlight/browse/search', locals: { search: search } expect(response).to have_selector 'small', text: /#{search.documents.size} items/i end end
Version data entries
9 entries across 9 versions & 1 rubygems