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 1201d5370b..41f02f46a3 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 @@ -54,7 +54,9 @@ 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?) - ids = ids.empty? "id:NEVER_USE_THIS_ID" : ids + if ids.empty?: + ids = "id:NEVER_USE_THIS_ID" + end expect(solr_params[:fq]).to eq ["-" + Hyrax::SolrQueryService.new.with_ids(ids: ids).build] end end