From 5b230a20cce1b3b783b8c0ea92f53c354460e7cf Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Thu, 28 Oct 2021 21:45:35 -0400 Subject: [PATCH] update search builders to use `config.collection_classes` --- .../hyrax/admin_admin_set_member_search_builder_spec.rb | 2 +- spec/search_builders/hyrax/collection_search_builder_spec.rb | 2 +- spec/search_builders/hyrax/work_search_builder_spec.rb | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/search_builders/hyrax/admin_admin_set_member_search_builder_spec.rb b/spec/search_builders/hyrax/admin_admin_set_member_search_builder_spec.rb index 108aa82028..1585f9d5f1 100644 --- a/spec/search_builders/hyrax/admin_admin_set_member_search_builder_spec.rb +++ b/spec/search_builders/hyrax/admin_admin_set_member_search_builder_spec.rb @@ -13,7 +13,7 @@ it 'searches for valid work types' do expect(builder.filter_models(solr_params)) - .to contain_exactly("{!terms f=has_model_ssim}Monograph,#{Hyrax.config.collection_class}") + .to contain_exactly("{!terms f=has_model_ssim}Monograph,#{Hyrax.config.collection_classes}") end it 'does not limit to active only' do diff --git a/spec/search_builders/hyrax/collection_search_builder_spec.rb b/spec/search_builders/hyrax/collection_search_builder_spec.rb index 04c94b0908..9a2033fcd2 100644 --- a/spec/search_builders/hyrax/collection_search_builder_spec.rb +++ b/spec/search_builders/hyrax/collection_search_builder_spec.rb @@ -12,7 +12,7 @@ describe '#models' do its(:models) do is_expected - .to contain_exactly(*[::Collection, Hyrax.config.collection_class].uniq) + .to contain_exactly(*Hyrax.config.collection_classes) end end diff --git a/spec/search_builders/hyrax/work_search_builder_spec.rb b/spec/search_builders/hyrax/work_search_builder_spec.rb index d4db5f1dab..5c8d7d9216 100644 --- a/spec/search_builders/hyrax/work_search_builder_spec.rb +++ b/spec/search_builders/hyrax/work_search_builder_spec.rb @@ -13,7 +13,8 @@ end let(:class_filter_string) do - [Monograph, Collection, Hyrax.config.collection_class].uniq.join(',') + klasses = [Monograph] + Hyrax.config.collection_classes + klasses.uniq.join(',') end describe "#query" do