diff --git a/spec/search_builders/hyrax/my/find_works_search_builder_spec.rb b/spec/search_builders/hyrax/my/find_works_search_builder_spec.rb index c2522bb280..1201d5370b 100644 --- a/spec/search_builders/hyrax/my/find_works_search_builder_spec.rb +++ b/spec/search_builders/hyrax/my/find_works_search_builder_spec.rb @@ -52,8 +52,10 @@ it "is successful new same code way" do subject ids = Hyrax::SolrService.query("{!field f=id}#{work.id}", fl: "member_ids_ssim").flat_map { |x| x.fetch("member_ids_ssim", []) } + ids = [ids] ids = ids.reject(&:blank?) - expect(solr_params[:fq]).to eq ["-" + Hyrax::SolrQueryService.new.with_ids(ids: [ids]).build] + ids = ids.empty? "id:NEVER_USE_THIS_ID" : ids + expect(solr_params[:fq]).to eq ["-" + Hyrax::SolrQueryService.new.with_ids(ids: ids).build] end end