From 3f6d565e0d18075f4b08f1f9e1759dd4659f7264 Mon Sep 17 00:00:00 2001 From: Ryan Orlando Date: Tue, 28 Nov 2023 10:54:12 -0500 Subject: [PATCH] clean up --- .../hyrax/my/find_works_search_builder_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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..fdf83182fc 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