Sha256: 944122236f42a9b4ebf15062d3a8c91d6d619ffd0a1712f8914ee455bd332d00

Contents?: true

Size: 612 Bytes

Versions: 1

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Blacklight::Base do
  let(:controller) { (Class.new(ApplicationController) { include Blacklight::Base }).new }
  subject { controller}

  describe "#search_state" do
    let(:raw_params) { HashWithIndifferentAccess.new a: 1 }
    let(:params) { ActionController::Parameters.new raw_params }
    before { allow(controller).to receive_messages(params: params) }
    subject { controller.send(:search_state) }

    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

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-7.0.0.rc1 spec/controllers/blacklight/base_spec.rb