Sha256: ada304f1436118432442a866cf31e72b5f7730a48a6d621e914a6380fbe66783

Contents?: true

Size: 628 Bytes

Versions: 7

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

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

7 entries across 7 versions & 1 rubygems

Version Path
blacklight-6.3.1 spec/controllers/blacklight/base_spec.rb
blacklight-6.3.0 spec/controllers/blacklight/base_spec.rb
blacklight-6.2.0 spec/controllers/blacklight/base_spec.rb
blacklight-6.1.0 spec/controllers/blacklight/base_spec.rb
blacklight-6.0.2 spec/controllers/blacklight/base_spec.rb
blacklight-6.0.1 spec/controllers/blacklight/base_spec.rb
blacklight-6.0.0 spec/controllers/blacklight/base_spec.rb