Sha256: 495d2bf84d5f973d2746c367019fa67b5b59a95027f6dcc75af98a9778753c34

Contents?: true

Size: 776 Bytes

Versions: 5

Compression:

Stored size: 776 Bytes

Contents

require 'spec_helper'

describe "catalog/_index_header_default" do
  let :document do
    SolrDocument.new :id => 'xyz', :format => 'a'
  end

  let :blacklight_config do
    Blacklight::Configuration.new
  end

  it "should render the document header" do
    assign :response, double(:params => {})
    view.stub(:current_search_session).and_return nil
    view.stub(:search_session).and_return({})
    view.stub(:render_grouped_response?).and_return false
    view.stub(:blacklight_config).and_return(blacklight_config)
    view.stub(:render_bookmarks_control?).and_return false
    render :partial => "catalog/index_header_default", :locals => {:document => document, :document_counter => 1}
    expect(rendered).to have_selector('.document-counter', text: "2")
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-5.5.1 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.5.0 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.4.0 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.4.0.rc1 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.3.0 spec/views/catalog/_index_header_default.html.erb_spec.rb