Sha256: c0ae542139d4ead06d66d30ab5dbd608bdd83b900af7f77f40273cfdc0968ed9

Contents?: true

Size: 616 Bytes

Versions: 49

Compression:

Stored size: 616 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Blacklight::Base do
  subject { controller }

  let(:controller) { (Class.new(ApplicationController) { include Blacklight::Base }).new }

  describe "#search_state" do
    subject { controller.send(:search_state) }

    let(:raw_params) { HashWithIndifferentAccess.new a: 1 }
    let(:params) { ActionController::Parameters.new raw_params }

    before { allow(controller).to receive_messages(params: params) }

    it "creates a path object" do
      expect(subject).to be_kind_of Blacklight::SearchState
      expect(subject.params).to eq raw_params
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
blacklight-7.24.0 spec/controllers/blacklight/base_spec.rb
blacklight-7.23.0.1 spec/controllers/blacklight/base_spec.rb
blacklight-7.23.0 spec/controllers/blacklight/base_spec.rb
blacklight-7.22.2 spec/controllers/blacklight/base_spec.rb
blacklight-7.22.1 spec/controllers/blacklight/base_spec.rb
blacklight-7.22.0 spec/controllers/blacklight/base_spec.rb
blacklight-7.21.2 spec/controllers/blacklight/base_spec.rb
blacklight-7.21.1 spec/controllers/blacklight/base_spec.rb
blacklight-7.21.0 spec/controllers/blacklight/base_spec.rb
blacklight-7.20.1 spec/controllers/blacklight/base_spec.rb
blacklight-7.20.0 spec/controllers/blacklight/base_spec.rb
blacklight-7.19.2 spec/controllers/blacklight/base_spec.rb
blacklight-7.19.1 spec/controllers/blacklight/base_spec.rb
blacklight-7.19.0 spec/controllers/blacklight/base_spec.rb
blacklight-7.18.1 spec/controllers/blacklight/base_spec.rb
blacklight-7.18.0 spec/controllers/blacklight/base_spec.rb
blacklight-7.17.2 spec/controllers/blacklight/base_spec.rb
blacklight-7.17.1 spec/controllers/blacklight/base_spec.rb
blacklight-7.17.0 spec/controllers/blacklight/base_spec.rb
blacklight-7.16.0 spec/controllers/blacklight/base_spec.rb