Sha256: 74ffa463bb767d93cbddf682427e10b62a2b9a233b08e7da83f7691cbc93690b

Contents?: true

Size: 597 Bytes

Versions: 10

Compression:

Stored size: 597 Bytes

Contents

require 'spec_helper'

RSpec.describe Hyrax::SingleAdminSetSearchBuilder do
  let(:ability) { instance_double(Ability, admin?: true) }
  let(:context) do
    double(blacklight_config: CatalogController.blacklight_config,
           current_ability: ability)
  end
  let(:builder) { described_class.new(context) }
  describe "#query" do
    before do
      expect(builder).to receive(:find_one)
    end
    subject { builder.with(id: '123').query.fetch('fq') }
    it do
      is_expected.to match_array ["",
                                  "{!terms f=has_model_ssim}AdminSet"]
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb
hyrax-1.1.0 spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb
hyrax-1.0.5 spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb
hyrax-1.0.4 spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb
hyrax-1.0.3 spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb
hyrax-1.0.2 spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb
hyrax-1.0.1 spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb
hyrax-1.0.0.rc2 spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb
hyrax-1.0.0.rc1 spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb
test_hyrax-0.0.1.alpha spec/search_builder/hyrax/single_admin_set_search_builder_spec.rb