Sha256: 7a384fd8cfb13ee3bf1cfea672bbd571b1fe0534590fc39b45f8e77575b80d6b
Contents?: true
Size: 1.11 KB
Versions: 4
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' # Note: this is a direct copy of the corresponding test in Blacklight # with changes for "views/my" instead of "views/catalog" describe "my/facet.html.erb" do let(:display_facet) { double } let(:blacklight_config) { Blacklight::Configuration.new } before do blacklight_config.add_facet_field "xyz", label: "Facet title" view.stub(:blacklight_config).and_return(blacklight_config) allow(view).to receive(:blacklight_config).and_return(blacklight_config) stub_template "my/_facet_pagination.html.erb" => "pagination" assign :facet, blacklight_config.facet_fields["xyz"] assign :display_facet, display_facet end it "should have the facet title" do allow(view).to receive(:render_facet_limit) render expect(rendered).to have_selector "h3", text: "Facet title" end it "should render facet pagination" do allow(view).to receive(:render_facet_limit) render expect(rendered).to have_content "pagination" end it "should render the facet limit" do expect(view).to receive(:render_facet_limit).with(display_facet, layout: false) render end end
Version data entries
4 entries across 4 versions & 1 rubygems