Sha256: ec8d0d8e68caf0dc271e26982376d9d2d5e4bbe927d446795ce5fcbb28ea3d5c

Contents?: true

Size: 800 Bytes

Versions: 18

Compression:

Stored size: 800 Bytes

Contents

describe 'spotlight/search_configurations/_sort', type: :view do
  let(:exhibit) { FactoryGirl.create(:exhibit) }
  before do
    assign(:exhibit, exhibit)
    assign(:blacklight_configuration, exhibit.blacklight_configuration)
    allow(view).to receive_messages(
      current_exhibit: exhibit,
      translate_sort_fields: ''
    )
  end

  let(:f) do
    form_helper = nil
    controller.view_context.bootstrap_form_for(exhibit.blacklight_configuration, url: '/update') do |f|
      form_helper = f
    end
    form_helper
  end

  it 'has a disabled relevance sort option' do
    render partial: 'spotlight/search_configurations/sort', locals: { f: f }
    expect(rendered).to have_selector "input[name='blacklight_configuration[sort_fields][relevance][enable]'][disabled='disabled']"
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-spotlight-0.28.3 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.28.2 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.28.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.28.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.27.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.26.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.26.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.25.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.24.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.23.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.22.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.21.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.20.3 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.20.2 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.20.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.20.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.19.2 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.19.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb