Sha256: 1efb3f88d81183b329420fbeff437a41d527668606c4869237f9f4fae838e131

Contents?: true

Size: 1.42 KB

Versions: 47

Compression:

Stored size: 1.42 KB

Contents

describe 'spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb', type: :view do
  let(:p) { 'spotlight/sir_trevor/blocks/solr_documents_carousel_block.html.erb' }
  let(:block) do
    SirTrevorRails::Blocks::SolrDocumentsCarouselBlock.new({ type: 'block', data: {} }, page)
  end

  before do
    allow(block).to receive(:each_document).and_return([
                                                         [{}, SolrDocument.new(id: 1)],
                                                         [{}, SolrDocument.new(id: 2)],
                                                         [{}, SolrDocument.new(id: 3)]
                                                       ])
    allow(block).to receive_messages(documents?: true)
    allow(view).to receive_messages(solr_documents_carousel_block: block)
    allow(view).to receive_messages(has_thumbnail?: true, render_thumbnail_tag: 'thumb', blacklight_config: Blacklight::Configuration.new)
  end

  it 'has a slideshow block' do
    render partial: p, locals: { item_carousel_block: block }
    expect(rendered).to have_selector '.carousel-block'
    expect(rendered).to have_selector '.carousel-control.left'
    expect(rendered).to have_selector '.carousel-control.right'
    expect(rendered).to have_selector '.item', text: 'thumb', count: 3
    expect(rendered).to have_selector '.carousel-indicators'
    expect(rendered).to have_selector '.carousel-indicators li', count: 3
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
blacklight-spotlight-2.0.2 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-2.0.1 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-2.0.0 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-2.0.0.rc6 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-2.0.0.rc5 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-2.0.0.rc4 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-2.0.0.rc3 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-2.0.0.rc2 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-2.0.0.rc1 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-1.5.1 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-1.4.1 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-1.4.0 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-1.3.0 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-1.2.0 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-1.1.0 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-1.0.0 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-1.0.0.alpha2 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-1.0.0.alpha1 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-0.34.1 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb
blacklight-spotlight-0.34.0 spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb