spec/endeca/document_spec.rb in primedia-endeca-0.9.19 vs spec/endeca/document_spec.rb in primedia-endeca-0.9.20
- old
+ new
@@ -247,9 +247,20 @@
Endeca::Document.map(:apartments => :showapartments)
Endeca::Document.transform_query_options("apartments" => true).
should == {:showapartments => 1}
end
end
+
+ describe "with multiple keys that are joined" do
+ it "should include all the keys" do
+ require 'pp'
+ Endeca::Document.map(:apartments => :showapartments).into('Ntt' => 'Ntk')
+ Endeca::Document.map(:colleges => :showcolleges).into('Ntt' => 'Ntk')
+ ntt = Endeca::Document.transform_query_options('apartments' => '1', 'colleges' => '2')[:Ntt]
+ ntt.should include('showapartments')
+ ntt.should include('showcolleges')
+ end
+ end
describe "when there is no mapping for the given key" do
it "returns the query options without modification" do
Endeca::Document.transform_query_options(@query_options).
should == @query_options