Sha256: 0ddb728354f2ce79daed497c04fed81155afd53d0c1c466f2b7a146755a2c95b

Contents?: true

Size: 990 Bytes

Versions: 17

Compression:

Stored size: 990 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Blacklight::Configuration::SessionTrackingConfig do
  subject(:config) { described_class.new }

  it "defaults @storage to 'server'" do
    expect(config.storage).to eq 'server'
  end

  context "@storage is set to 'server'" do
    before do
      config.storage = 'server'
    end

    it "defaults components values" do
      expect(config.applied_params_component).to eq Blacklight::SearchContext::ServerAppliedParamsComponent
      expect(config.item_pagination_component).to eq Blacklight::SearchContext::ServerItemPaginationComponent
    end

    it "defaults tracking url helper" do
      expect(config.url_helper).to be_nil
    end
  end

  context "@storage is set to false" do
    before do
      config.storage = false
    end

    it "defaults components values" do
      expect(config.applied_params_component).to be_nil
    end

    it "defaults tracking url helper" do
      expect(config.url_helper).to be_nil
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
blacklight-8.6.1 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.6.0 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.5.1 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.5.0 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.4.0 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.3.0 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.2.2 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.2.1 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.2.0 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.1.0 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.0.1 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.0.0 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.0.0.beta8 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.0.0.beta7 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.0.0.beta6 spec/lib/blacklight/configuration/session_tracking_config_spec.rb
blacklight-8.0.0.beta5 spec/lib/blacklight/configuration/session_tracking_config_spec.rb