Skip to content

Commit 0869c07

Browse files
committed
Test sorting with Rust::Array.
1 parent d0af632 commit 0869c07

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/spec/functional/indexes/rust_based_spec.rb

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ def initialize id, title, author
5353
# TODO Cannot be called twice!
5454
books.search('title').ids.should == expected
5555
end
56+
it 'can sort' do
57+
expected = Rust::Array.new << 1 << 2
58+
results = books.search('title')
59+
results.sort_by { |x| -x }
60+
results.ids.should == expected
61+
end
5662
end
5763

5864
context 'with 1K books' do

0 commit comments

Comments
 (0)