spec/endeca/document_spec.rb in primedia-endeca-1.0.0 vs spec/endeca/document_spec.rb in primedia-endeca-1.1.0

- old
+ new

@@ -38,9 +38,18 @@ # Hashes are not ordered and order is not important [{:M => "recs_per_page:10|expand_all_dims:1"}, {:M => "expand_all_dims:1|recs_per_page:10"}]. should include(Endeca::Document.transform_query_options(:limit => 10, :expand_refinements => 1)) end end + + describe "with splitting values" do + it "should duplicate the key for each value passed" do + Endeca::Document.map(:features => :feature_cat).split_into(:ntk => :ntt) + [ + {:ntk=>"feature_cat|feature_cat", :ntt=>"Driveway|Alarm"} + ].should include(Endeca::Document.transform_query_options(:features => 'Driveway,Alarm')) + end + end end describe '.find' do before do @query_options = {:foo => :bar}