Sha256: c50c221ac9a28af707a2dbdb98837f17256a5223d49a0bfcd8033b953a606cb9
Contents?: true
Size: 690 Bytes
Versions: 15
Compression:
Stored size: 690 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 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
15 entries across 15 versions & 1 rubygems