spec/integration/riak/secondary_index_spec.rb in riak-client-2.2.0.pre1 vs spec/integration/riak/secondary_index_spec.rb in riak-client-2.2.0
- old
+ new
@@ -16,22 +16,22 @@
it "finds keys for an equality query" do
expect(bucket.get_index('index_int', 20)).to eq(["20"])
end
it "finds keys for a range query" do
- expect(bucket.get_index('index_int', 19..21)).to match_array(["19","20", "21"])
+ expect(bucket.get_index('index_int', 19..21)).to match_array(%w(19 20 21))
end
it "returns an empty array for a query that does not match any keys" do
expect(bucket.get_index('index_int', 10000)).to eq([])
end
it "returns terms" do
results = nil
expect do
results = bucket.get_index('index_int',
- 19..21,
+ 19..21,
return_terms: true)
end.to_not raise_error
expect(results).to be_a Array
expect(results.with_terms).to be_a Hash
@@ -39,10 +39,10 @@
it "returns terms matching a term_regex" do
results = nil
expect do
results = bucket.get_index('index_bin',
- '19'..'21',
+ '19'..'21',
return_terms: true,
term_regex: '20')
end.to_not raise_error
terms = results.with_terms