Skip to content

Commit

Permalink
update search builders to use config.collection_classes
Browse files Browse the repository at this point in the history
  • Loading branch information
elrayle committed Oct 29, 2021
1 parent 18afc11 commit 5b230a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion spec/search_builders/hyrax/work_search_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b230a2

Please sign in to comment.