spec/index/query_clause_spec.rb in ddr-models-2.4.0.rc5 vs spec/index/query_clause_spec.rb in ddr-models-2.4.0.rc6
- old
+ new
@@ -41,10 +41,14 @@
describe ".where" do
describe "when the value is a string" do
subject { described_class.where("foo", "Jungle Fever") }
its(:to_s) { is_expected.to eq "foo:\"Jungle Fever\"" }
end
- describe "when the value is an array" do
+ describe "when the value is an Array with one entry" do
+ subject { described_class.where("foo", ["Jungle Fever"]) }
+ its(:to_s) { is_expected.to eq "foo:\"Jungle Fever\"" }
+ end
+ describe "when the value is an array with multiple entries" do
subject { described_class.where("foo", ["Jungle Fever", "bar"]) }
its(:to_s) { is_expected.to eq "{!lucene q.op=OR df=foo}\"Jungle Fever\" bar" }
end
end
end