Sha256: 6e989071c6562014309ccbfc912e46a119904abab785bad2073fa9bb6a6ab7c3
Contents?: true
Size: 707 Bytes
Versions: 23
Compression:
Stored size: 707 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 fq_params.find {|a| a =~ /format\:\((\"Book\"|\"Thesis\") +OR +(\"Thesis\"|\"Book\")/}.should_not be_nil fq_params.find {|a| a =~ /location\:\((\"Library\"|\"Online\") +OR +(\"Library\"|\"Online\")/}.should_not be_nil end end end
Version data entries
23 entries across 23 versions & 1 rubygems