Sha256: cb6047b2872249c2e101e31ca2e161af68fb9f82872a1da60e66016edb8576dc

Contents?: true

Size: 729 Bytes

Versions: 9

Compression:

Stored size: 729 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(: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

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-5.0.3 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.1.1 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.2.0 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.1.0 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.0.2 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.0.1 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.0.0 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.0.0.pre4 spec/views/catalog/_index_header_default.html.erb_spec.rb
blacklight-5.0.0.pre3 spec/views/catalog/_index_header_default.html.erb_spec.rb