Sha256: 663b6cca8aa8fe460ece5e4eeb83e37da42c8e8e62b997e1c54c3ccefacb62b0

Contents?: true

Size: 1.04 KB

Versions: 9

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'

describe "catalog/index.html.erb" do
  it "should render the sidebar and content panes" do
    view.stub(:blacklight_config).and_return(Blacklight::Configuration.new)
    render
    expect(rendered).to match /id="sidebar"/
    expect(rendered).to match /id="content"/
  end

  it "should render the search_sidebar partial " do
    stub_template "catalog/_search_sidebar.html.erb" => "sidebar_content"

    view.stub(:blacklight_config).and_return(Blacklight::Configuration.new)
    render
    expect(rendered).to match /sidebar_content/
  end

  it "should render the search_header partial " do
    stub_template "catalog/_results_pagination.html.erb" => ""
    stub_template "catalog/_search_header.html.erb" => "header_content"

    view.stub(:blacklight_config).and_return(Blacklight::Configuration.new)
    view.stub(:has_search_parameters?).and_return(true)
    view.stub(:render_opensearch_response_metadata).and_return("")
    assign(:response, double(:empty? => true))
    render
    expect(rendered).to match /header_content/
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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