Sha256: b9ffb5ca354d20c6b226c50968a2b9974fc0b65849f0050b1c4392031a4438fc
Contents?: true
Size: 1.41 KB
Versions: 13
Compression:
Stored size: 1.41 KB
Contents
# frozen_string_literal: true describe 'spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb', type: :view do let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_grid_block.html.erb' } let(:page) { double('Page') } let(:block) do SirTrevorRails::Blocks::SolrDocumentsGridBlock.new({ type: 'block', data: { title: 'Some title', text: 'Some text', 'text-align' => 'right' } }, page) end let(:blacklight_config) do Blacklight::Configuration.new end before do allow(block).to receive(:each_document).and_return([ [{}, SolrDocument.new(id: 1)], [{}, SolrDocument.new(id: 2)], [{}, SolrDocument.new(id: 3)] ]) end before do allow(view).to receive_messages( blacklight_config: blacklight_config, has_thumbnail?: true, render_thumbnail_tag: 'thumb' ) end it 'has a slideshow block' do render partial: p, locals: { solr_documents_grid_block: block } expect(rendered).to have_selector 'h3', text: 'Some title' expect(rendered).to have_content 'Some text' expect(rendered).to have_selector '.box', text: 'thumb', count: 3 expect(rendered).to have_selector '.items-col' expect(rendered).to have_selector '.text-col' end end
Version data entries
13 entries across 13 versions & 1 rubygems