Sha256: b82c4e25bd8c495f9e29b0620820c3f4640ea10f26bcbdd140ebd78a1c43343e

Contents?: true

Size: 945 Bytes

Versions: 1

Compression:

Stored size: 945 Bytes

Contents

require 'spec_helper'

describe "Blacklight Range Limit" do
  before do
    CatalogController.blacklight_config = Blacklight::Configuration.new
    CatalogController.configure_blacklight do |config|
      config.add_facet_field 'pub_date_sort', :range => true
      config.default_solr_params[:'facet.field'] = config.facet_fields.keys
    end

  end

  it "should show the range limit facet" do
    visit '/catalog'
    expect(page).to have_selector 'input.range_begin'
    expect(page).to have_selector 'input.range_end'
  end

  it "should provide distribution information" do
    visit '/catalog'
    click_link 'View distribution'

    expect(page).to have_content("1941 to 1944 (1)")
    expect(page).to have_content("2005 to 2008 (7)")
  end

  it "should limit appropriately" do
    visit '/catalog'
    click_link 'View distribution'
    click_link '1941 to 1944'

    expect(page).to have_content "1941 to 1944 (1) [remove]"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight_range_limit-2.3.0 spec/features/blacklight_range_limit_spec.rb