Skip to content

Commit

Permalink
Adds class name switch in spec/services/hyrax/solr_query_service_spec…
Browse files Browse the repository at this point in the history
….rb.
  • Loading branch information
bwatson78 authored and jeremyf committed Jan 22, 2024
1 parent 592cd06 commit 023c9e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/services/hyrax/solr_query_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@
end

describe "#with_model" do
let(:expected_collection_class) { Hyrax.config.disable_wings ? 'CollectionResource' : 'Collection' }

it "generates and appends a query clause" do
expect(solr_query_service.with_model(model: ::Collection).query)
.to match_array [initial_query, '_query_:"{!field f=has_model_ssim}Collection"']
.to match_array [initial_query, "_query_:\"{!field f=has_model_ssim}#{expected_collection_class}\""]
end
end

Expand Down

0 comments on commit 023c9e0

Please sign in to comment.