Sha256: a9bc9c77a9e0362ee127167a07ad1292d7f0d9424791c4590a13511dbf259f3f
Contents?: true
Size: 1.25 KB
Versions: 74
Compression:
Stored size: 1.25 KB
Contents
# frozen_string_literal: true RSpec.describe Blacklight::SuggestHelperBehavior do before do allow(helper).to receive(:blacklight_config).and_return(blacklight_config) expect(Deprecation).to receive(:warn) end describe '#autocomplete_enabled?' do describe 'with autocomplete config' do let(:blacklight_config) do Blacklight::Configuration.new.configure do |config| config.autocomplete_enabled = true config.autocomplete_path = 'suggest' end end it 'is enabled' do expect(helper.autocomplete_enabled?).to be true end end describe 'without disabled config' do let(:blacklight_config) do Blacklight::Configuration.new.configure do |config| config.autocomplete_enabled = false config.autocomplete_path = 'suggest' end end it 'is disabled' do expect(helper.autocomplete_enabled?).to be false end end describe 'without path config' do let(:blacklight_config) do Blacklight::Configuration.new.configure do |config| config.autocomplete_enabled = true end end it 'is disabled' do expect(helper.autocomplete_enabled?).to be false end end end end
Version data entries
74 entries across 74 versions & 2 rubygems