Sha256: be1f6bdf58a2065443d45caa9dc6bfa71b66ad37622e4ad5550189a8514d663b

Contents?: true

Size: 788 Bytes

Versions: 20

Compression:

Stored size: 788 Bytes

Contents

require 'spec_helper'

describe Hydra::SearchBuilder do
  let(:processor_chain) { [:add_access_controls_to_solr_params] }
  let(:context) { double('context') }
  let(:user) { double('user', user_key: 'joe') }
  let(:current_ability) { double('ability', user_groups: [], current_user: user) }

  subject { described_class.new(processor_chain, context) }
  before { subject.current_ability = current_ability }

  it "should extend classes with the necessary Hydra modules" do
    expect(Hydra::SearchBuilder.included_modules).to include(Hydra::AccessControlsEnforcement)
  end

  context "when a query is generated" do
    it "should triggers add_access_controls_to_solr_params" do
      expect(subject).to receive(:add_access_controls_to_solr_params)
      subject.query
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
hydra-core-8.2.0 spec/search_builders/search_builder_spec.rb
hydra-core-9.8.1 spec/search_builders/search_builder_spec.rb
hydra-core-9.8.0 spec/search_builders/search_builder_spec.rb
hydra-core-9.7.1 spec/search_builders/search_builder_spec.rb
hydra-core-9.7.0 spec/search_builders/search_builder_spec.rb
hydra-core-9.6.0 spec/search_builders/search_builder_spec.rb
hydra-core-9.5.0 spec/search_builders/search_builder_spec.rb
hydra-core-9.4.1 spec/search_builders/search_builder_spec.rb
hydra-core-9.4.0 spec/search_builders/search_builder_spec.rb
hydra-core-9.3.0 spec/search_builders/search_builder_spec.rb
hydra-core-9.2.2 spec/search_builders/search_builder_spec.rb
hydra-core-9.2.1 spec/search_builders/search_builder_spec.rb
hydra-core-9.2.0 spec/search_builders/search_builder_spec.rb
hydra-core-9.2.0.rc1 spec/search_builders/search_builder_spec.rb
hydra-core-9.1.4 spec/search_builders/search_builder_spec.rb
hydra-core-9.1.3 spec/search_builders/search_builder_spec.rb
hydra-core-8.1.0 spec/search_builders/search_builder_spec.rb
hydra-core-9.1.2 spec/search_builders/search_builder_spec.rb
hydra-core-9.1.1 spec/search_builders/search_builder_spec.rb
hydra-core-9.1.0 spec/search_builders/search_builder_spec.rb