Sha256: b155dc28abe686e113b0ab39a4f7dd03218db93a2b7ae3e788170ef1f3ee5420

Contents?: true

Size: 727 Bytes

Versions: 10

Compression:

Stored size: 727 Bytes

Contents

# frozen_string_literal: true

RSpec.describe "catalog/_document_list", type: :view 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_selector(".documents-some-view")
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
blacklight-8.2.2 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.2.1 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.2.0 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.1.0 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.0.1 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.0.0 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.0.0.beta8 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.0.0.beta7 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.0.0.beta6 spec/views/catalog/_document_list.html.erb_spec.rb
blacklight-8.0.0.beta5 spec/views/catalog/_document_list.html.erb_spec.rb