Sha256: 9929753a802e1eabb3162928b0180503ed15b770504c1e65b5bfb07225b83443
Contents?: true
Size: 1.2 KB
Versions: 6
Compression:
Stored size: 1.2 KB
Contents
require 'spec_helper' describe "catalog/index.html.erb" do describe "with no search parameters" do before do view.stub(:has_search_parameters?).and_return(false) view.stub(:blacklight_config).and_return(Blacklight::Configuration.new) end it "should render the sidebar and content panes" do 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" render expect(rendered).to match /sidebar_content/ end end describe "with search parameters" do before do view.stub(:has_search_parameters?).and_return(true) 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(:render_opensearch_response_metadata).and_return("") assign(:response, double(:empty? => true)) end it "should render the search_header partial " do render expect(rendered).to match /header_content/ end end end
Version data entries
6 entries across 6 versions & 1 rubygems