Sha256: 8b9640d56e21afffce84f6f3c7e727f57a88bf79857b5e432dbd29668baca567
Contents?: true
Size: 715 Bytes
Versions: 10
Compression:
Stored size: 715 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') def setFilters(f) @filters = f end def filters @filters end describe "BlacklightAdvancedSearch::FilterParser" do include BlacklightAdvancedSearch::FilterParser describe "filter processing" do it "should generate an appropriate fq param" do setFilters(:format => ["Book", "Thesis"], :location=>["Online", "Library"]) fq_params = generate_solr_fq expect(fq_params.find {|a| a =~ /format\:\((\"Book\"|\"Thesis\") +OR +(\"Thesis\"|\"Book\")/}).not_to be_nil expect(fq_params.find {|a| a =~ /location\:\((\"Library\"|\"Online\") +OR +(\"Library\"|\"Online\")/}).not_to be_nil end end end
Version data entries
10 entries across 10 versions & 1 rubygems