summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/search_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/search_spec.rb b/spec/search_spec.rb
index aa222fa..ac81acc 100644
--- a/spec/search_spec.rb
+++ b/spec/search_spec.rb
@@ -6,21 +6,21 @@ require 'chef_zero/solr/solr_doc'
describe ChefZero::Solr::SolrParser do
let (:all_docs) do
docs = []
- [{'foo' => 1},
- {'foo' => 7}].each_with_index do |h, i|
+ [{'foo' => 'a'},
+ {'foo' => 'd'}].each_with_index do |h, i|
docs.push ChefZero::Solr::SolrDoc.new(h, i)
end
docs
end
it "handles terms" do
- q = ChefZero::Solr::SolrParser.new('foo:7').parse
+ q = ChefZero::Solr::SolrParser.new('foo:d').parse
results = all_docs.select {|doc| q.matches_doc?(doc) }
results.size.should eq(1)
end
it "handles ranges" do
- q = ChefZero::Solr::SolrParser.new('foo:[1 TO 5]').parse
+ q = ChefZero::Solr::SolrParser.new('foo:[a TO c]').parse
results = all_docs.select {|doc| q.matches_doc?(doc) }
results.size.should eq(1)
end