Skip to content
Browse files

tests for facet_value_to_fq_string() boolean handling

  • Loading branch information...
1 parent d95e7ec commit 542efaec21130a4448ec54f773083c85451edbd3 @groner committed Feb 23, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 test_support/spec/lib/solr_helper_spec.rb
View
8 test_support/spec/lib/solr_helper_spec.rb
@@ -159,6 +159,14 @@ def params
facet_value_to_fq_string("facet_name", "my value").should == "{!raw f=facet_name}my value"
end
+ it "should pass booleans through" do
+ facet_value_to_fq_string("facet_name", true).should == "facet_name:true"
+ end
+
+ it "should pass boolean-like strings through" do
+ facet_value_to_fq_string("facet_name", "true").should == "facet_name:true"
+ end
+
it "should pass integers through" do
facet_value_to_fq_string("facet_name", 1).should == "facet_name:1"
end

0 comments on commit 542efae

Please sign in to comment.
Something went wrong with that request. Please try again.