Changeset 163
- Timestamp:
- 03/14/07 16:58:04 (2 years ago)
- Files:
-
- trunk/demo/test/unit/content_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/demo/test/unit/content_test.rb
r160 r163 213 213 end 214 214 215 def test_sort_with_limit 216 sorting = [ Ferret::Search::SortField.new(:id, :type => :string, :reverse => true) ] 217 result = Content.find_by_contents('comment_count:2 OR comment_count:1', :sort => sorting) 218 assert result.size > 2 219 result = Content.find_by_contents('comment_count:2 OR comment_count:1', :sort => sorting, :limit => 2) 220 assert_equal 2, result.size 221 assert result.first.id > result.last.id 222 end 223 215 224 def test_multi_index 216 225 i = ActsAsFerret::MultiIndex.new([Content, Comment])
