Sha256: 72f08a025a34dc853bff0b297fce492ad4e6fe34cf8459759c2f59a541617654

Contents?: true

Size: 882 Bytes

Versions: 26

Compression:

Stored size: 882 Bytes

Contents

require 'spec_helper'

module Spotlight
  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
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
blacklight-spotlight-0.17.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.17.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.16.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.15.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.14.2 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.14.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.14.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.13.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.12.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.12.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.11.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.10.3 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.10.2 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.10.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.10.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.9.2 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.9.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.9.0 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.8.2 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb
blacklight-spotlight-0.8.1 spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb