Sha256: 49cf55b7e98109d2a5601d4dd952a8bf38c53ce12ce2e82a91689c090ddfe2c1

Contents?: true

Size: 709 Bytes

Versions: 8

Compression:

Stored size: 709 Bytes

Contents

# frozen_string_literal: true

RSpec.describe "catalog/_document_list" do
  let(:view_type) { 'some-view' }
  let(:view_config) { double(Blacklight::Configuration::ViewConfig) }

  before do
    allow(view_config).to receive_messages(key: view_type, document_component: Blacklight::DocumentComponent, partials: [])
    allow(view).to receive_messages(document_index_view_type: view_type, documents: [], blacklight_config: nil)
    assign(:response, instance_double(Blacklight::Solr::Response, start: 0))
  end

  it "includes a class for the current view" do
    render(partial: "catalog/document_list", locals: { view_config: view_config })
    expect(rendered).to have_css(".documents-some-view")
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
blacklight-8.7.0 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.6.1 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.6.0 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.5.1 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.5.0 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.4.0 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.3.0 spec/views/catalog/_document_list.html.erb_spec.rb