Sha256: ab796141781f32d8da1804f98b511449dd7f2d7258f63e7f293331f6eb921965
Contents?: true
Size: 731 Bytes
Versions: 10
Compression:
Stored size: 731 Bytes
Contents
# frozen_string_literal: true RSpec.describe Blacklight::Base do subject { controller } let(:controller) { Deprecation.silence(described_class) { (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 do controller.blacklight_config.search_state_fields << :a allow(controller).to receive_messages(params: params) end 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
10 entries across 10 versions & 2 rubygems