<commit_before>require 'spec_helper'

describe CurationConcerns::AdminSetSearchBuilder do
  let(:processor_chain) { [:filter_models] }
  let(:context) { double('context') }
  let(:user) { double('user') }
  let(:solr_params) { { fq: [] } }

  subject { described_class.new(context, :read) }
  describe '#filter_models' do
    before { subject.filter_models(solr_params) }

    it 'adds AdminSet to query' do
      expect(solr_params[:fq].first).to include('{!field f=has_model_ssim}AdminSet')
    end
  end
end<commit_msg>Add a test for AdminSetSearchBuilder<commit_after>require 'spec_helper'

describe CurationConcerns::AdminSetSearchBuilder do
  let(:context) { double('context') }
  let(:solr_params) { { fq: [] } }

  let(:builder) { described_class.new(context, :read) }
  describe '#filter_models' do
    before { builder.filter_models(solr_params) }

    it 'adds AdminSet to query' do
      expect(solr_params[:fq].first).to include('{!field f=has_model_ssim}AdminSet')
    end
  end

  describe ".default_processor_chain" do
    subject { described_class.default_processor_chain }
    it { is_expected.to include :filter_models }
  end
end
{'fraction_non_alphanumeric': 0.12706701479547433, 'fraction_numerical': 0.0, 'mean_word_length': 4.897435897435898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4046160', 'n_tokens_mistral': 391, 'n_tokens_neox': 381, 'n_words': 75}