Sha256: 9410d941804f4eef992e944b2d6c280b6ecbd8a65d21820050356823cba0457e

Contents?: true

Size: 1.03 KB

Versions: 11

Compression:

Stored size: 1.03 KB

Contents

require 'spec_helper'

describe "catalog/_document_slideshow.html.erb", :type => :view do
  let(:blacklight_config) do
    Blacklight::Configuration.new do |config|
      config.track_search_session = false
    end
  end

  let(:document) { stub_model(::SolrDocument) }

  before do
    allow(view).to receive_messages(
      blacklight_config: blacklight_config,
      documents: [document],
      document_index_view_type: 'slideshow',
      document_counter_with_offset: 1
    )
    allow(view).to receive(:current_search_session).and_return(nil)
    allow(view).to receive(:search_session).and_return({})
    allow(view).to receive(:search_state).and_return(Blacklight::SearchState.new({}, blacklight_config))
  end

  it 'has a modal' do
    render
    expect(rendered).to have_selector '#slideshow-modal'
    expect(rendered).to have_selector '[data-slide="prev"]'
    expect(rendered).to have_selector '[data-slide="next"]'
    expect(rendered).to have_selector '[data-slide-to="0"][data-toggle="modal"][data-target="#slideshow-modal"]'
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
blacklight-gallery-3.5.0 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.4.0 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.3.1 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.3.0 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.2.0 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.1.0 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.0.4 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.0.3 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.0.2 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.0.1 spec/views/catalog/_document_slideshow.html.erb_spec.rb
blacklight-gallery-3.0.0 spec/views/catalog/_document_slideshow.html.erb_spec.rb